This commit is contained in:
zyy 2020-05-22 11:31:10 +08:00
commit 87ddea085b
19 changed files with 271 additions and 38 deletions

View File

@ -82,7 +82,7 @@ export default {
},
subscribeMessage(res) {
if (this.$refs.deomonTopic && !window.location.href.includes('trainroom')) {
if (getSessionStorage('project') != 'refereeJsxt') {
if (getSessionStorage('project') != 'refereeJsxt' && getSessionStorage('project') != 'jsxt') {
this.$refs.deomonTopic.doShow(res);
}
this.$store.dispatch('socket/setRoomInvite');

View File

@ -116,8 +116,7 @@ export default {
},
mounted() {
const isDev = process.env.NODE_ENV === 'development';
const isTest = process.env.NODE_ENV === 'test';
if (isDev || isTest) {
if (isDev) {
this.menuNormal.Center.push({
label: '新建计划车',
handler: this.addPlanTrain,

View File

@ -102,8 +102,7 @@ export default {
},
mounted() {
const isDev = process.env.NODE_ENV === 'development';
const isTest = process.env.NODE_ENV === 'test';
if (isDev || isTest) {
if (isDev) {
this.menuNormal.Center.push( {
label: '新建计划列车',
handler: this.createPlanTrain,

View File

@ -106,8 +106,7 @@ export default {
},
mounted() {
const isDev = process.env.NODE_ENV === 'development';
const isTest = process.env.NODE_ENV === 'test';
if (isDev || isTest) {
if (isDev) {
this.menuNormal.Center.push( {
label: '新建计划列车',
handler: this.createPlanTrain,

View File

@ -117,8 +117,7 @@ export default {
},
mounted() {
const isDev = process.env.NODE_ENV === 'development';
const isTest = process.env.NODE_ENV === 'test';
if (isDev || isTest) {
if (isDev) {
this.menuNormal.Center.push({
label: '新建计划车',
handler: this.addPlanTrain,

View File

@ -164,8 +164,7 @@ export default {
},
mounted() {
const isDev = process.env.NODE_ENV === 'development';
const isTest = process.env.NODE_ENV === 'test';
if (isDev || isTest) {
if (isDev) {
this.menuNormal.Center.push({
label: '新建计划车',
handler: this.addPlanTrain,

View File

@ -111,8 +111,7 @@ export default {
},
mounted() {
const isDev = process.env.NODE_ENV === 'development';
const isTest = process.env.NODE_ENV === 'test';
if (isDev || isTest) {
if (isDev) {
this.menuNormal.Center.push({
label: '新建计划车',
handler: this.createPlanTrain,

View File

@ -135,8 +135,7 @@ export default {
},
mounted() {
const isDev = process.env.NODE_ENV === 'development';
const isTest = process.env.NODE_ENV === 'test';
if (isDev || isTest) {
if (isDev) {
this.menuNormal.Center.push({
label: '新建计划车',
handler: this.addPlanTrain,

View File

@ -0,0 +1,180 @@
<template>
<el-dialog v-dialogDrag class="xian-01__systerm train-control" :title="title" :visible.sync="show" width="370px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-select
v-model="groupNumber"
filterable
:disabled="true"
>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
<el-table :data="tableData" :show-header="false">
<el-table-column prop="key" label="key" />
<el-table-column prop="value" label="value" />
</el-table>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.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 Handler from '@/scripts/cmdPlugin/Handler';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default {
name: 'TrainControl',
components: {
},
data() {
return {
trainList: [],
tableData: [],
baseInfo: [],
marshallingInfo: [],
planInfo: [],
atcInfo: [],
operation: null,
dialogShow: false,
loading: false,
groupNumber: ''
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdConfirm() {
return OperationEvent.Train.trainDetailInfo.confirm.operation;
},
domIdCancel() {
return OperationEvent.Command.cancel.menu.domId;
},
title() {
return '列车详细运行信息';
}
},
watch: {},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.operation = operate.operation;
}
const model = this.$store.getters['map/getDeviceByCode'](selected.code);
this.groupNumber = model.groupNumber;
this.baseInfo = [
{key: '车组号', value: model.groupNumber},
{key: '车次号', value: ''},
{key: '表号', value: ''},
{key: '目的地号', value: ''},
{key: '类型', value: ''},
{key: '司机号', value: ''},
{key: '车站', value: ''},
{key: '所处设备', value: ''},
{key: '跟踪模式', value: ''},
{key: 'ATP切除', value: ''},
{key: '停站状态', value: ''}
];
this.marshallingInfo = [
{key: '车组号', value: ''},
{key: '设备ID', value: ''},
{key: '车头号1', value: ''},
{key: '车头号2', value: ''},
{key: '车厢号1', value: ''},
{key: '车厢号2', value: ''},
{key: '车厢号3', value: ''},
{key: '车厢号4', value: ''},
{key: '车厢号5', value: ''},
{key: '车厢号6', value: ''},
{key: '车厢号7', value: ''},
{key: '车厢号8', value: ''}
];
this.planInfo = [
{key: '车组号', value: ''},
{key: '车次号', value: ''},
{key: '表号', value: ''},
{key: '运行等级', value: ''},
{key: '状态', value: ''},
{key: '计划偏离', value: ''},
{key: '停站时间', value: ''},
{key: '计划到站', value: ''},
{key: '计划到点', value: ''},
{key: '计划发点', value: ''},
{key: '终端发车站台', value: ''},
{key: '终端发车时间', value: ''},
{key: '预计离开站台', value: ''},
{key: '预计离开时间', value: ''},
{key: '预计到达站台', value: ''},
{key: '预计到达时间', value: ''},
{key: '区间运行时分', value: ''}
];
this.atcInfo = [
{key: '车组号', value: ''},
{key: '车次号', value: ''},
{key: '表号', value: ''},
{key: '运行方向', value: ''},
{key: '扣车状态', value: ''},
{key: '车门状态', value: ''},
{key: '驾驶模式', value: ''},
{key: '目的地号', value: ''}
];
this.tableData = this.baseInfo;
/** 加载列车数据*/
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);
},
commit() {
const operate = {
operation: OperationEvent.Train.trainDetailInfo.confirm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -148,8 +148,7 @@ export default {
},
mounted() {
const isDev = process.env.NODE_ENV === 'development';
const isTest = process.env.NODE_ENV === 'test';
if (isDev || isTest) {
if (isDev) {
this.menuNormal.Center.push({
label: '新建计划车',
handler: this.addPlanTrain,

View File

@ -52,12 +52,12 @@ export default {
{
label: this.$t('menu.menuTrain.addTrainId'),
handler: this.addTrainId,
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
cmdType:''
},
{
label: this.$t('menu.menuTrain.deleteTrainId'),
handler: this.delTrainId,
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
cmdType:''
},
{
label: this.$t('menu.menuTrain.editTrainId'),
@ -67,17 +67,32 @@ export default {
{
label: this.$t('menu.menuTrain.editTrainNo'),
handler: this.editTrainNo,
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
cmdType:''
},
{
label: this.$t('menu.menuTrain.moveTrainId'),
handler: this.moveTrainId,
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
cmdType:''
},
{
label: this.$t('menu.menuTrain.switchTrainId'),
handler: this.switchTrainId,
cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
cmdType:''
},
{
label: '标记ATP切除',
handler: this.undeveloped(),
cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_CUT
},
{
label: '标记ATP激活',
handler: this.undeveloped(),
cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_RECOVER
},
{
label: '查看列车详细运行信息',
handler: this.undeveloped(),
cmdType: CMD.TrainWindow.CMD_TRAIN_INFO
}
]
},
@ -139,10 +154,6 @@ export default {
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce, ...this.menuSpeed];
}
// this.menu = this.menuNormal.Center;
// console.log(this.menu, '222222222222222');
// this.menu = MenuContextHandler.covert(this.menu);
},
doShow(point) {
this.clickEvent();
@ -306,6 +317,7 @@ export default {
}
});
},
undeveloped() {},
//
switchTrainId() {
const step = {

View File

@ -154,8 +154,7 @@ export default {
},
mounted() {
const isDev = process.env.NODE_ENV === 'development';
const isTest = process.env.NODE_ENV === 'test';
if (isDev || isTest) {
if (isDev) {
this.menuNormal.Center.push({
label: '新建计划车',
handler: this.addPlanTrain,

View File

@ -222,7 +222,29 @@ export default {
},
TrainWindow: {
/** 修改列车识别号 */
CMD_TRAIN_UPDATE_TYPE: {value: 'Train_Update_Type', label: '修改列车识别号'}
CMD_TRAIN_UPDATE_TYPE: {value: 'Train_Update_Type', label: '修改列车识别号'},
/** 设置车组号 */
CMD_TRAIN_ADD_TRAIN_TRACE: {value: 'Train_Add_Train_Trace', label: '设置车组号'},
/** 删除车组号 */
CMD_TRAIN_REMOVE_TRAIN_TRACE: {value: 'Train_Remove_Train_Trace', label: '删除车组号'},
/** 移动车组号 */
CMD_TRAIN_MOVE_TRAIN_TRACE: {value: 'Train_Move_Train_Trace', label: '移动车组号'},
/** 设计划车 */
CMD_TRAIN_SET_PLAN: {value: 'Train_Set_Plan', label: '设计划车'},
/** 设头码车 */
CMD_TRAIN_SET_HEAD: {value: 'Train_Set_Head', label: '设头码车'},
/** 设人工车 */
CMD_TRAIN_SET_MANUAL: {value: 'Train_Set_Manual', label: '设人工车'},
/** 设乘务组号 */
CMD_TRAIN_SET_CREW_NUMBER: {value:'Train_Set_Crew_Number', label: '设乘务组号'},
/** 标记ATP切除 */
CMD_TRAIN_TAG_ATP_CUT: {value: 'Train_Tag_Atp_Cut', label: '标记ATP切除'},
/** 标记ATP恢复 */
CMD_TRAIN_TAG_ATP_RECOVER: {value: 'Train_Tag_Atp_Recover', label: '标记ATP恢复'},
/** 放行冲突列车 */
CMD_TRAIN_ALLOW_PASS: {value:'Train_Allow_Pass', label: '放行冲突列车'},
/** 列车信息 */
CMD_TRAIN_INFO: {value: 'Train_Info', label:'列车信息'}
},
Fault: {
CMD_SET_FAULT: {value: 'Set_Fault', label: '设置故障'},

View File

@ -17,7 +17,8 @@ class CommandHandle {
Local: {},
Common: {
Set_Fault:{operate: 'Set_Fault', paramList:[{name: 'code'}, {name: 'faultType'}]},
Cancel_Fault: {operate:'Cancel_Fault', paramList:[{name: 'code'}, {name: 'faultType'}]}
Cancel_Fault: {operate:'Cancel_Fault', paramList:[{name: 'code'}, {name: 'faultType'}]},
Train_Init_Plan: {operate: 'Train_Init_Plan', paramList: [{name: 'sectionCode'}, {name: 'serviceNumber'}, {name: 'tripNumber'}]}
}
};
(list || []).forEach(definition => {

View File

@ -1954,8 +1954,18 @@ export const OperationEvent = {
operation: '70e4',
domId: '_Tips-Train-createPlanTrain-ChangeTripNumber'
}
},
// 查看列车详细信息
trainDetailInfo: {
menu: {
operation: '70f',
domId: '_Tip-Train_trainDetailInfo-Menu'
},
confirm: {
operation: '70f1',
domId: '_Tips-Train-trainDetailInfo-Confirm'
}
}
},
// 取消全线临时限速

View File

@ -155,6 +155,7 @@ export default {
} catch (error) {
if (error.code == 30001) {
const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id);
localStore.remove();
if (url) {
this.$router.push(url);
}

View File

@ -13,7 +13,7 @@
<!-- <el-button :disabled="!jsStart" type="success" @click="startCompetition">开始</el-button> -->
<el-button type="danger" @click="endCompetition">结束</el-button>
</template>
<el-button v-if="project==='refereeJsxt'" type="danger" @click="refeeEndCompetition">返回</el-button>
<el-button v-if="project==='refereeJsxt'" type="success" @click="refeeEndCompetition">返回</el-button>
<el-button v-if="project!=='jsxt'&&project!=='refereeJsxt'" type="primary" :loading="backLoading" @click="back">{{ $t('global.back') }}</el-button>
</el-button-group>
</div>

View File

@ -19,7 +19,7 @@
v-model="node.deviceCode"
size="mini"
:placeholder="$t('global.choose')"
:disabled="isDisable"
:disabled="isDisable || starting"
:options="deviceList"
@change="handleUpdUser(node, index)"
/>
@ -28,8 +28,7 @@
v-model="node.deviceCode"
:placeholder="$t('global.choose')"
size="mini"
:disabled="isDisable"
s
:disabled="isDisable || starting"
@change="handleUpdUser(node, index)"
>
<el-option
@ -95,6 +94,9 @@ export default {
} else {
return false;
}
},
starting() {
return this.room.state == '02';
}
},
methods: {

View File

@ -311,7 +311,11 @@ export default {
}];
if (this.drawWay === 'true') {
params[0].userRole = 'AUDIENCE';
await putUserRolesNew(params, this.group);
try {
await putUserRolesNew(params, this.group);
} catch (error) {
this.$message(error.message);
}
} else {
await putUserRoles(params, this.group);
}
@ -340,7 +344,12 @@ export default {
} else if (roleType === 'Repair') {
params[0].userRole = 'MAINTAINER';
}
await putUserRolesNew(params, this.group);
try {
await putUserRolesNew(params, this.group);
} catch (error) {
this.$message(error.message);
}
} else {
await putUserRoles(params, this.group);
}
@ -366,7 +375,12 @@ export default {
} else {
list = userList.map(elem => { return { id: elem.id, nickName: elem.nickName, userRole: roleType.toUpperCase() }; });
}
await putUserRolesNew(list, this.group);
try {
await putUserRolesNew(list, this.group);
} catch (error) {
this.$message(error.message);
}
} else {
list = userList.map(elem => { return { id: elem.id, nickName: elem.nickName, userRole: roleType }; });
await putUserRoles(list, this.group);