Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly
This commit is contained in:
commit
2df2af557f
@ -198,18 +198,12 @@ export function getAllPublishTrainingList(params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
/** 根据mapId查所有的已发布单操实训的基础信息 */
|
||||
export function getPublishSingleList(mapId) {
|
||||
/** 查询组织已发布实训的基础信息 */
|
||||
export function getPublishTrainingListInOrg(params) {
|
||||
return request({
|
||||
url: `/api/v2/training/published/${mapId}/singles`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 根据mapId查所有的已发布场景实训的基础信息 */
|
||||
export function getPublishScenesList(mapId) {
|
||||
return request({
|
||||
url: `/api/v2/training/published/${mapId}/scenes`,
|
||||
method: 'get'
|
||||
url: `/api/v2/training/published/infos`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
/** 根据实训id查该已发布实训的所有信息 */
|
||||
|
@ -69,6 +69,7 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '../childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
@ -153,8 +154,10 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
// send: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.detail.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -316,8 +316,9 @@ export default {
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
const operate = {};
|
||||
|
||||
const operate = {
|
||||
send: true
|
||||
};
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-bar ref="menuBar" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-train ref="menuTrain" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-station ref="menuStation" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-bar ref="menuBar" :selected="selected" :work="work" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" :work="work" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" :work="work" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" :work="work" />
|
||||
<menu-section ref="menuSection" :selected="selected" :work="work" />
|
||||
<menu-train ref="menuTrain" :selected="selected" :work="work" />
|
||||
<menu-station ref="menuStation" :selected="selected" :work="work" />
|
||||
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" :work="work" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="xian-01__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
@ -58,7 +58,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: []
|
||||
menuNormal: [],
|
||||
work: 'dispatchWork'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -113,7 +114,7 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
if (this.work === 'dispatchWork') {
|
||||
this.$store.state.map.map.stationList.forEach(station => {
|
||||
if (station.relStationCodeList && station.relStationCodeList.length) {
|
||||
const node = {
|
||||
@ -138,7 +139,7 @@ export default {
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
} else if (this.$store.state.training.prdType == '01') {
|
||||
} else if (this.work === 'localWork') {
|
||||
const roleDeviceCode = this.$store.state.training.roleDeviceCode;
|
||||
const displayList = this.$store.state.map.map.displayList;
|
||||
const display = displayList.find(each=>{
|
||||
|
@ -5,7 +5,7 @@
|
||||
<!--<div class="holdTrainStatus">H</div>-->
|
||||
<!--<div class="jumpStopStatus">S</div>-->
|
||||
<!--</div>-->
|
||||
<station-control-convert ref="stationControlConvert" @warningInfoDoShow="warningInfoDoShow" />
|
||||
<station-control-convert ref="stationControlConvert" :work="work" @warningInfoDoShow="warningInfoDoShow" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
@ -62,6 +62,12 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
work: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-bar ref="menuBar" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'localWork'" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" :work="'localWork'" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" :work="'localWork'" />
|
||||
<menu-section ref="menuSection" :selected="selected" :work="'localWork'" />
|
||||
<menu-train ref="menuTrain" :selected="selected" :work="'localWork'" />
|
||||
<menu-station ref="menuStation" :selected="selected" :work="'localWork'" />
|
||||
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" :work="'localWork'" />
|
||||
<menu-bar ref="menuBar" :selected="selected" :work="work" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" :work="work" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" :work="work" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" :work="work" />
|
||||
<menu-section ref="menuSection" :selected="selected" :work="work" />
|
||||
<menu-train ref="menuTrain" :selected="selected" :work="work" />
|
||||
<menu-station ref="menuStation" :selected="selected" :work="work" />
|
||||
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" :work="work" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="xian-01__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
@ -58,7 +58,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: []
|
||||
menuNormal: [],
|
||||
work: 'localWork'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -113,7 +114,7 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
if (this.work === 'dispatchWork') {
|
||||
this.$store.state.map.map.stationList.forEach(station => {
|
||||
if (station.relStationCodeList && station.relStationCodeList.length) {
|
||||
const node = {
|
||||
@ -138,7 +139,7 @@ export default {
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
} else if (this.$store.state.training.prdType == '01') {
|
||||
} else if (this.work === 'localWork') {
|
||||
const roleDeviceCode = this.$store.state.training.roleDeviceCode;
|
||||
const displayList = this.$store.state.map.map.displayList;
|
||||
const display = displayList.find(each=>{
|
||||
|
@ -5,7 +5,7 @@
|
||||
<!--<div class="holdTrainStatus">H</div>-->
|
||||
<!--<div class="jumpStopStatus">S</div>-->
|
||||
<!--</div>-->
|
||||
<station-control-convert ref="stationControlConvert" @warningInfoDoShow="warningInfoDoShow" />
|
||||
<station-control-convert ref="stationControlConvert" :work="work" @warningInfoDoShow="warningInfoDoShow" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
@ -62,6 +62,12 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
work: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -74,6 +74,14 @@ export default {
|
||||
components: {
|
||||
TwoConfirmation
|
||||
},
|
||||
props: {
|
||||
work: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
@ -155,7 +163,7 @@ export default {
|
||||
this.updateTableValue(controlTransfer);
|
||||
if (controlTransfer.applicantId && this.$store.state.training.memberData[controlTransfer.applicantId] &&
|
||||
this.$store.state.training.memberData[controlTransfer.applicantId].userId == this.$store.state.user.id &&
|
||||
this.$store.state.training.prdType === '01'
|
||||
this.work === 'localWork'
|
||||
) {
|
||||
this.$emit('warningInfoDoShow', controlTransfer);
|
||||
}
|
||||
@ -248,7 +256,7 @@ export default {
|
||||
},
|
||||
initTableDataStatus() {
|
||||
this.tableData = [];
|
||||
if (this.$store.state.training.prdType === '02') {
|
||||
if (this.work === 'dispatchWork') {
|
||||
this.stationList && this.stationList.forEach(station => {
|
||||
if (station.createControlMode) {
|
||||
const control = this.$store.getters['map/getDeviceByCode'](station.code);
|
||||
@ -263,7 +271,7 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if (this.$store.state.training.prdType === '01') {
|
||||
} else if (this.work === 'localWork') {
|
||||
const stationCodeList = this.$store.state.map.stationControlMap[this.$store.state.training.roleDeviceCode];
|
||||
stationCodeList && stationCodeList.forEach(stationCode => {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stationCode);
|
||||
|
@ -61,10 +61,11 @@ export default {
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK,
|
||||
isDisabled: (section, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade === 1;
|
||||
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade === 1 || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return section.blockade === 1;
|
||||
return section.blockade === 1 || device.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||
@ -74,10 +75,11 @@ export default {
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK,
|
||||
isDisabled: (section, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade !== 1;
|
||||
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade !== 1 || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return section.blockade !== 1;
|
||||
return section.blockade !== 1 || device.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||
@ -86,18 +88,42 @@ export default {
|
||||
label: '故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||
isDisabled: (section, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return device.controlMode !== 'Local';
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||
},
|
||||
{
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
|
||||
isDisabled: (section, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return device.controlMode !== 'Local';
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (section, work) => section.type === '02'
|
||||
},
|
||||
{
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
|
||||
isDisabled: (section, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return device.controlMode !== 'Local';
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (section, work) => section.type === '02'
|
||||
},
|
||||
{
|
||||
@ -111,7 +137,7 @@ export default {
|
||||
return section.cutOff === 1;
|
||||
}
|
||||
},
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
@ -124,7 +150,7 @@ export default {
|
||||
return section.cutOff !== 1;
|
||||
}
|
||||
},
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'dispatchWork'
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
|
@ -65,22 +65,39 @@ export default {
|
||||
{
|
||||
label: '进路选排',
|
||||
handler: this.arrangementRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
|
||||
isDisabled: (signal, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return false;
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '进路取消',
|
||||
handler: this.cancelTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
|
||||
isDisabled: (signal, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return false;
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK,
|
||||
isDisabled: (signal, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.blockade === 1;
|
||||
} else {
|
||||
return signal.blockade === 1;
|
||||
return signal.blockade === 1 || device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -89,85 +106,135 @@ export default {
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
|
||||
isDisabled: (signal, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.blockade !== 1;
|
||||
} else {
|
||||
return signal.blockade !== 1;
|
||||
return signal.blockade !== 1 || device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL,
|
||||
isDisabled: (signal, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return false;
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL,
|
||||
isDisabled: (signal, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return false;
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: this.work === 'localWork' ? '引导进路办理' : '进路引导',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
isDisabled: (signal, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return false;
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动进路',
|
||||
handler: this.setAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
|
||||
isDisabled: (signal, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 0;
|
||||
} else {
|
||||
return signal.fleetMode !== 0;
|
||||
}
|
||||
return signal.fleetMode !== 0 || device.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '取消联锁自动进路',
|
||||
handler: this.cancelAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
|
||||
isDisabled: (signal, work) => {
|
||||
console.log('🚀 ~ file: menuSignal.vue:182 ~ data ~ signal', signal);
|
||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 1;
|
||||
} else {
|
||||
return signal.fleetMode !== 1;
|
||||
}
|
||||
return signal.fleetMode !== 1 || device.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER,
|
||||
isDisabled: (signal, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl === 1 || !signal.canSetCi;
|
||||
} else {
|
||||
return signal.ciControl === 1 || !signal.canSetCi;
|
||||
}
|
||||
return signal.ciControl === 1 || !signal.canSetCi || device.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '取消联锁自动触发',
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER,
|
||||
isDisabled: (signal, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl !== 1;
|
||||
} else {
|
||||
return signal.ciControl !== 1;
|
||||
}
|
||||
return signal.ciControl !== 1 || device.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (signal, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '进路交人工控',
|
||||
handler: this.humanControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
||||
isDisabled: (signal, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return false;
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '进路交ATS自动控',
|
||||
handler: this.atsAutoControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
|
||||
isDisabled: (signal, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return false;
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '查询进路状态',
|
||||
|
@ -55,30 +55,65 @@ export default {
|
||||
label: '上电解锁',
|
||||
handler: this.powerUnLock,
|
||||
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
|
||||
isDisabled: (station, work) => {
|
||||
if (work === 'localWork') {
|
||||
return station.controlMode !== 'Local';
|
||||
} else {
|
||||
return station.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (station, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '全站设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER,
|
||||
isDisabled: (station, work) => {
|
||||
if (work === 'localWork') {
|
||||
return station.controlMode !== 'Local';
|
||||
} else {
|
||||
return station.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (station, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '全站取消联锁自动触发',
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
|
||||
isDisabled: (station, work) => {
|
||||
if (work === 'localWork') {
|
||||
return station.controlMode !== 'Local';
|
||||
} else {
|
||||
return station.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (station, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '所有进路交ATS自动控',
|
||||
handler: this.atsAutoControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
||||
isDisabled: (station, work) => {
|
||||
if (work === 'localWork') {
|
||||
return station.controlMode !== 'Local';
|
||||
} else {
|
||||
return station.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (station, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '所有进路交人工控',
|
||||
handler: this.humanControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
|
||||
isDisabled: (station, work) => {
|
||||
if (work === 'localWork') {
|
||||
return station.controlMode !== 'Local';
|
||||
} else {
|
||||
return station.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (station, work) => work === 'localWork'
|
||||
},
|
||||
// {
|
||||
@ -90,12 +125,26 @@ export default {
|
||||
label: '所有进路交人工控',
|
||||
handler: this.humanControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
|
||||
isDisabled: (station, work) => {
|
||||
if (work === 'localWork') {
|
||||
return station.controlMode !== 'Local';
|
||||
} else {
|
||||
return station.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (station, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '所有进路交ATS自动控',
|
||||
handler: this.atsAutoControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
||||
isDisabled: (station, work) => {
|
||||
if (work === 'localWork') {
|
||||
return station.controlMode !== 'Local';
|
||||
} else {
|
||||
return station.controlMode !== 'Center';
|
||||
}
|
||||
},
|
||||
isShow: (station, work) => work === 'dispatchWork'
|
||||
}
|
||||
// {
|
||||
|
@ -67,8 +67,9 @@ export default {
|
||||
handler: this.setDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
|
||||
isDisabled: (stand, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 0;
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 0 || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return stand.centerHoldTrain !== 0;
|
||||
}
|
||||
@ -79,8 +80,9 @@ export default {
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
|
||||
isDisabled: (stand, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 1;
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 1 || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return stand.centerHoldTrain !== 1;
|
||||
}
|
||||
@ -91,20 +93,23 @@ export default {
|
||||
handler: this.cancelDetainTrainForce,
|
||||
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN,
|
||||
isDisabled: (stand, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
isShow: (section, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '查询站台状态',
|
||||
handler: this.detail,
|
||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS,
|
||||
isDisabled: (stand, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -137,7 +142,7 @@ export default {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
|
||||
} else {
|
||||
return stand.allSkip !== 1 || stand.assignSkip !== 1;
|
||||
return stand.allSkip !== 1 && stand.assignSkip !== 1;
|
||||
}
|
||||
},
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
@ -220,7 +225,7 @@ export default {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
// 非故障模式 且 角色为车站值班员时 增加PSL盘
|
||||
if (this.operatemode !== OperateMode.FAULT && this.$store.state.training.prdType === '01') {
|
||||
if (this.operatemode !== OperateMode.FAULT && this.work === 'localWork') {
|
||||
this.menu = [
|
||||
...this.menu,
|
||||
{
|
||||
|
@ -57,10 +57,11 @@ export default {
|
||||
handler: this.lock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock === 1;
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock === 1 || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return switchDevice.singleLock === 1;
|
||||
return switchDevice.singleLock === 1 || device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -69,10 +70,11 @@ export default {
|
||||
handler: this.unlock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock !== 1;
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock !== 1 || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return switchDevice.singleLock !== 1;
|
||||
return switchDevice.singleLock !== 1 || device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -81,10 +83,11 @@ export default {
|
||||
handler: this.block,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_BLOCK,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade === 1;
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade === 1 || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return switchDevice.blockade === 1;
|
||||
return switchDevice.blockade === 1 || device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -93,47 +96,96 @@ export default {
|
||||
handler: this.unblock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade !== 1;
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade !== 1 || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return switchDevice.blockade !== 1;
|
||||
return switchDevice.blockade !== 1 || device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '道岔转动',
|
||||
handler: this.switchTurnout,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '道岔故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '计轴预复位',
|
||||
handler: this.axlePreReset,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET
|
||||
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
// {
|
||||
// label: '计轴预复位',
|
||||
// handler: this.axlePreReset,
|
||||
// cmdType:CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET
|
||||
// },
|
||||
{
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '道岔设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '道岔取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
|
||||
} else {
|
||||
return device.controlMode !== 'Center';
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
|
@ -381,3 +381,33 @@ export const SimulationUserType = {
|
||||
TEACHER: 'TEACHER',
|
||||
STUDENT: 'STUDENT'
|
||||
};
|
||||
/** 客户端list */
|
||||
export const ClientList = [
|
||||
{ label: '中心ATS工作站', value: 'dispatchWork' },
|
||||
{ label: '中心ATS大屏', value: 'bigScreen' },
|
||||
{ label: '现地ATS工作站', value: 'localWork' },
|
||||
{ label: 'ISCS', value: 'iscsView' },
|
||||
{ label: 'IBP', value: 'ibp' },
|
||||
{ label: 'PSL', value: 'psl' },
|
||||
{ label: '列车驾驶', value: 'drivingPlan' },
|
||||
{ label: 'CCTV', value: 'cctvView' },
|
||||
{ label: '设备视图', value: 'jl3dModle' },
|
||||
{ label: '数字沙盘', value: 'digitalStand' },
|
||||
{ label: '车务终端', value: 'trafficTerminal' },
|
||||
{ label: '车务管理终端', value: 'trafficManageTerminal' },
|
||||
{ label: '调度命令', value: 'dispatchingCommand' },
|
||||
{ label: '调度计划', value: 'schedulingPlan' },
|
||||
{ label: '大客流策略', value: 'largePassengerStrategy' },
|
||||
{ label: '大客流视图', value: 'largePassengerView' },
|
||||
{ label: '行调台', value: 'dispatcherManage' },
|
||||
{ label: '派班工作站', value: 'scheduleWork' },
|
||||
{ label: '应急调度', value: 'emergency' },
|
||||
{ label: '运行图加载', value: 'diagramLoad' },
|
||||
{ label: '运行图预览', value: 'diagramPreview' },
|
||||
{ label: '运行图编制', value: 'diagramEdit' }
|
||||
];
|
||||
/** 实训类型list */
|
||||
export const TrainingTypeList = [
|
||||
{label: '场景', value: 'SCENE'},
|
||||
{label: '单操', value: 'SINGLE'}
|
||||
];
|
||||
|
@ -11,6 +11,7 @@
|
||||
<training-design v-if="trainingDesign" ref="trainingDesign" />
|
||||
<chat-box v-if="hasVoice" ref="chatBox" :group="group" />
|
||||
<design-training-menu v-if="trainingDesign && trainingDetail" ref="trainingMenu" :offset-bottom="offsetBottom" />
|
||||
<training-left-slider ref="trainingLeftSlider" @overallTranslation="overallTranslation" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -29,6 +30,7 @@ import TrainingMenu from './trainingList/trainingMenu';
|
||||
import TrainingDesign from './trainingDesign/designPane.vue';
|
||||
import ChatBox from './chatBox';
|
||||
import DesignTrainingMenu from './trainingList/designTrainingMenu';
|
||||
import TrainingLeftSlider from './trainingList/trainingLeftSlider';
|
||||
export default {
|
||||
name: 'DisplayDraft',
|
||||
components: {
|
||||
@ -40,7 +42,8 @@ export default {
|
||||
TrainingMenu,
|
||||
TrainingDesign,
|
||||
ChatBox,
|
||||
DesignTrainingMenu
|
||||
DesignTrainingMenu,
|
||||
TrainingLeftSlider
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -104,8 +107,13 @@ export default {
|
||||
} else {
|
||||
exitSimulation(this.group);
|
||||
}
|
||||
|
||||
},
|
||||
methods:{
|
||||
overallTranslation(flag) {
|
||||
const panel = document.getElementById('leftSlider');
|
||||
panel.style.transform = flag ? 'translateX(400px)' : '';
|
||||
},
|
||||
// 缩放设置
|
||||
setWindowSize() {
|
||||
const width = this.width;
|
||||
|
146
src/views/newMap/display/trainingList/trainingLeftSlider.vue
Normal file
146
src/views/newMap/display/trainingList/trainingLeftSlider.vue
Normal file
@ -0,0 +1,146 @@
|
||||
<template>
|
||||
<div id="leftSlider" class="left-slider">
|
||||
<div class="tip-title">
|
||||
<span>实训列表</span>
|
||||
</div>
|
||||
<div class="handleShow">
|
||||
<span v-if="!show" class="el-icon-arrow-left" style="cursor:pointer" @click="handleSliderShow(false)" />
|
||||
</div>
|
||||
<div class="slider-tree">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" style="background: #fff;">
|
||||
<template v-for="(training, index) in trainingList">
|
||||
<div :key="training.id" class="training-name-box" :class="{'active': trainingDetail && trainingDetail.id === training.id}" @click="loadScript(training)">
|
||||
<span>{{ `${index + 1}、${training.name}` }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPublishTrainingListInOrg, getPublishTrainingDetail, loadPublishTraining } from '@/api/jmap/training';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
export default {
|
||||
name: 'LeftSlider',
|
||||
data() {
|
||||
return {
|
||||
show: true,
|
||||
treeList: [],
|
||||
defaultProps: '',
|
||||
trainingList: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
mapId () {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
trainingDetail() {
|
||||
console.log(this.$store.state.trainingNew.trainingDetail, '****');
|
||||
return this.$store.state.trainingNew.trainingDetail;
|
||||
},
|
||||
group () {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
EventBus.$on('handleSliderShow', () => {
|
||||
this.handleSliderShow(true);
|
||||
});
|
||||
this.initLoadPage();
|
||||
},
|
||||
methods: {
|
||||
initLoadPage() {
|
||||
getPublishTrainingListInOrg({mapId: this.mapId}).then(response => {
|
||||
this.trainingList = response.data;
|
||||
}).catch(error => {
|
||||
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
|
||||
});
|
||||
},
|
||||
handleSliderShow(flag) {
|
||||
this.$emit('overallTranslation', flag);
|
||||
const slider = document.getElementById('leftSlider');
|
||||
if (flag) {
|
||||
slider.style.transform = 'translateX(0)';
|
||||
this.show = false;
|
||||
} else {
|
||||
slider.style.transform = '';
|
||||
this.show = true;
|
||||
}
|
||||
},
|
||||
async loadScript(training) {
|
||||
if (this.trainingSwitch) {
|
||||
this.$message.error('请先结束当前实训后再加载新的实训!');
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const detailResp = await getPublishTrainingDetail(training.id);
|
||||
this.training = detailResp.data;
|
||||
if (detailResp.data.mapLocationJson) {
|
||||
const mapLocation = JSON.parse(detailResp.data.mapLocationJson);
|
||||
this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y});
|
||||
}
|
||||
this.$store.dispatch('trainingNew/setTrainingDetail', detailResp.data);
|
||||
await loadPublishTraining(this.group, training.id, {mode: ''});
|
||||
this.$message.success('加载实训成功!');
|
||||
} catch (e) {
|
||||
this.$message.error('加载实训失败!');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.left-slider{
|
||||
z-index: 900;
|
||||
width: 400px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
transform: translateX(-400px);
|
||||
}
|
||||
.training-name-box{
|
||||
padding: 5px;
|
||||
font-size: 16px;
|
||||
color: green;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.training-name-box :hover{
|
||||
color: red;
|
||||
}
|
||||
.active {
|
||||
color: red;
|
||||
}
|
||||
.slider-tree{
|
||||
height: calc(100% - 40px);
|
||||
border: 2px solid #409EFF;
|
||||
}
|
||||
.handleShow{
|
||||
position: absolute;
|
||||
left: 395px;
|
||||
top: 50%;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
border-radius: 3px;
|
||||
box-shadow: 3px 1px 5px #000;
|
||||
padding: 3px;
|
||||
}
|
||||
.tip-title {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row-reverse;
|
||||
background-color: #409EFF;
|
||||
border-radius: 5px 5px 0 0;
|
||||
justify-content: center;
|
||||
padding: 0 10px;
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
@ -4,8 +4,7 @@
|
||||
<div ref="drapBox" class="reminder-box">
|
||||
<div class="tip-title">
|
||||
<div style="display: flex;justify-content: center;align-items: center;">
|
||||
<el-button v-show="showMenu" plain type="success" size="mini" style="margin-right: 10px;" @click="changeShow(false)">实训列表</el-button>
|
||||
<el-button v-show="!showMenu && trainingDetail" plain type="success" size="mini" style="margin-right: 10px;" @click="changeShow(true)">实训菜单</el-button>
|
||||
<i class="icon el-icon-document" @click="trainingListShow" />
|
||||
<i v-show="!isShrink && !trainingSwitch && trainingDetail" class="icon el-icon-video-play" @click="handlerStart" />
|
||||
<i v-show="!isShrink && trainingSwitch" class="icon el-icon-switch-button" @click="handlerEnd" />
|
||||
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
||||
@ -17,12 +16,12 @@
|
||||
</div>
|
||||
<div v-if="isShrink" class="reminder-box-content">
|
||||
<div class="zhezhao" />
|
||||
<div v-if="showMenu" ref="dragBody" class="tip-body-box">
|
||||
<div ref="dragBody" class="tip-body-box">
|
||||
<div class="tip-body">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('display.training.trainingName') }}</span>
|
||||
<span class="list-elem">{{ trainingDetail.name }}</span>
|
||||
<span class="list-elem">{{ trainingDetail ?trainingDetail.name:'' }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">实训模式:</span>
|
||||
@ -36,7 +35,7 @@
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label" style="vertical-align: top;"> {{ $t('display.training.trainingInstructions') }}</span>
|
||||
<span class="list-elem elem-span">{{ trainingDetail.description }}</span>
|
||||
<span class="list-elem elem-span">{{ trainingDetail ?trainingDetail.description:'' }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">操作按钮:</span>
|
||||
@ -52,16 +51,6 @@
|
||||
<div class="drag-bottom" />
|
||||
<div class="drag-top" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="单操实训" name="first">
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="场景实训" name="second">
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryListScene" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<scene-play-role ref="scenePlayRole" @startTraining="startTraining" />
|
||||
@ -74,7 +63,7 @@ import { ScriptMode } from '@/scripts/ConstDic';
|
||||
import { startTraining, endTraining } from '@/api/jmap/training';
|
||||
import ScenePlayRole from './scenePlayRole';
|
||||
import TestResult from './testResult';
|
||||
import { getPublishSingleList, getPublishTrainingDetail, loadPublishTraining, getPublishScenesList } from '@/api/jmap/training';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
export default {
|
||||
name: 'TipTrainingDetail',
|
||||
components: {
|
||||
@ -90,88 +79,11 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
isShrink: true,
|
||||
showSumbit: false,
|
||||
demoMode: ScriptMode.TEACH,
|
||||
TrainingMode: ScriptMode,
|
||||
activeName: 'first',
|
||||
showMenu: false,
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
training: {},
|
||||
queryForm: {
|
||||
labelWidth: '100px',
|
||||
reset: true,
|
||||
show:false
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
paginationHiden: true,
|
||||
indexShow: true,
|
||||
height: 200,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('trainingManage.name'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('trainingManage.description'),
|
||||
prop: 'description'
|
||||
},
|
||||
{
|
||||
title: this.$t('trainingManage.labelJson'),
|
||||
prop: 'labelJson'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('trainingManage.operate'),
|
||||
buttons: [
|
||||
{
|
||||
name: '加载',
|
||||
handleClick: this.loadScript,
|
||||
type: 'primary',
|
||||
showControl:(row) => { return row.id; }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
queryListScene: {
|
||||
query: this.queryFunctionScene,
|
||||
selectCheckShow: false,
|
||||
paginationHiden: true,
|
||||
indexShow: true,
|
||||
height: 200,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('trainingManage.name'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('trainingManage.description'),
|
||||
prop: 'description'
|
||||
},
|
||||
{
|
||||
title: this.$t('trainingManage.labelJson'),
|
||||
prop: 'labelJson'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('trainingManage.operate'),
|
||||
buttons: [
|
||||
{
|
||||
name: '加载',
|
||||
handleClick: this.loadScript,
|
||||
type: 'primary',
|
||||
showControl:(row) => { return row.id; }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
playerId: ''
|
||||
trainingDesign: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -192,15 +104,9 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
this.trainingDesign = this.$store.state.training.domConfig.trainingDesign;
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.showSumbit = false;
|
||||
},
|
||||
changeShow(val) {
|
||||
this.showMenu = val;
|
||||
},
|
||||
shrink() {
|
||||
if (this.isShrink) {
|
||||
this.isShrink = false;
|
||||
@ -246,35 +152,8 @@ export default {
|
||||
this.$message.error('结束实训失败!');
|
||||
});
|
||||
},
|
||||
queryFunction() {
|
||||
return getPublishSingleList(this.mapId);
|
||||
},
|
||||
queryFunctionScene() {
|
||||
return getPublishScenesList(this.mapId);
|
||||
},
|
||||
async loadScript(index, data) {
|
||||
if (this.trainingSwitch) {
|
||||
this.$message.error('请先结束当前实训后再加载新的实训!');
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const detailResp = await getPublishTrainingDetail(data.id);
|
||||
this.training = detailResp.data;
|
||||
if (detailResp.data.mapLocationJson) {
|
||||
const mapLocation = JSON.parse(detailResp.data.mapLocationJson);
|
||||
this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y});
|
||||
}
|
||||
this.playerId = '';
|
||||
if (detailResp.data.playerIdJson) {
|
||||
this.playerId = JSON.parse(detailResp.data.playerIdJson)[0];
|
||||
}
|
||||
this.showMenu = true;
|
||||
this.$store.dispatch('trainingNew/setTrainingDetail', detailResp.data);
|
||||
await loadPublishTraining(this.group, data.id, {mode: this.teachMode});
|
||||
this.$message.success('加载实训成功!');
|
||||
} catch (e) {
|
||||
this.$message.error('加载实训失败!');
|
||||
}
|
||||
trainingListShow() {
|
||||
EventBus.$emit('handleSliderShow');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -7,7 +7,6 @@
|
||||
import {queryMapListByUser} from '@/api/jmap/map';
|
||||
import Cookies from 'js-cookie';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
// import { getPublishSingleList, getPublishScenesList } from '@/api/jmap/training';
|
||||
import { deleteTraining } from '@/api/trainingManage';
|
||||
import { getTrainingList } from '@/api/trainingManage';
|
||||
// getPublishTrainingDetail, loadPublishTraining,
|
||||
|
@ -10,7 +10,7 @@ import { createSimulation } from '@/api/simulation';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { getPublishSingleList, getPublishScenesList, getAllPublishTrainingList } from '@/api/jmap/training';
|
||||
import { getAllPublishTrainingList, getPublishTrainingListInOrg } from '@/api/jmap/training';
|
||||
export default {
|
||||
name:'TrainingManage',
|
||||
data() {
|
||||
@ -25,14 +25,12 @@ export default {
|
||||
queryForm: {
|
||||
labelWidth: '100px',
|
||||
reset: false,
|
||||
initLoadCallback: this.initLoadCallback,
|
||||
queryObject: {
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: '地图名称',
|
||||
config: {
|
||||
default: '',
|
||||
noClear:true,
|
||||
data: []
|
||||
}
|
||||
},
|
||||
@ -41,7 +39,6 @@ export default {
|
||||
label: '实训类型',
|
||||
config: {
|
||||
default: '',
|
||||
noClear:true,
|
||||
data: [
|
||||
{label: '单操实训', value: 'single'},
|
||||
{label: '场景实训', value: 'scene'}
|
||||
@ -64,6 +61,13 @@ export default {
|
||||
title: this.$t('trainingManage.description'),
|
||||
prop: 'description'
|
||||
},
|
||||
{
|
||||
title:'所属地图',
|
||||
prop: 'mapId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('trainingManage.type'),
|
||||
prop: 'type',
|
||||
@ -116,38 +120,13 @@ export default {
|
||||
hasTeachingDataManage() {
|
||||
return this.$route.path.includes('/teachingDataManage/');
|
||||
},
|
||||
initLoadCallback(form) {
|
||||
if (this.hasTeachingDataManage()) {
|
||||
form.type = '';
|
||||
form.mapId = '';
|
||||
return;
|
||||
}
|
||||
if (!form.type) {
|
||||
form.type = 'single';
|
||||
}
|
||||
if (!form.mapId) {
|
||||
form.mapId = this.mapList[0] ? this.mapList[0].value : '';
|
||||
}
|
||||
},
|
||||
queryFunction(param) {
|
||||
delete param.pageSize;
|
||||
delete param.pageNum;
|
||||
if (this.hasTeachingDataManage()) {
|
||||
const params = {
|
||||
...param
|
||||
};
|
||||
delete params.pageSize;
|
||||
delete params.pageNum;
|
||||
return getAllPublishTrainingList(params);
|
||||
} else if (param.mapId) {
|
||||
if (param.type == 'single') {
|
||||
return getPublishSingleList(param.mapId);
|
||||
} else if (param.type == 'scene') {
|
||||
return getPublishScenesList(param.mapId);
|
||||
}
|
||||
return getAllPublishTrainingList(param);
|
||||
} else {
|
||||
return new Promise((resolve, reject)=>{
|
||||
const result = {data:[]};
|
||||
resolve(result);
|
||||
});
|
||||
return getPublishTrainingListInOrg(param);
|
||||
}
|
||||
},
|
||||
getLabelJson(row) {
|
||||
|
@ -111,6 +111,7 @@ import { getPassengerFlowData } from '@/api/simulation';
|
||||
import { queryPaperList } from '@/api/management/exam';
|
||||
import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||
import ChooseTraining from './chooseTraining';
|
||||
import { ClientList, TrainingTypeList } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'EditSubsystem',
|
||||
@ -118,33 +119,8 @@ export default {
|
||||
ChooseTraining
|
||||
},
|
||||
data() {
|
||||
const clientList = [
|
||||
{ label: '中心ATS工作站', value: 'dispatchWork' },
|
||||
{ label: '中心ATS大屏', value: 'bigScreen' },
|
||||
{ label: '现地ATS工作站', value: 'localWork' },
|
||||
{ label: 'ISCS', value: 'iscsView' },
|
||||
{ label: 'IBP', value: 'ibp' },
|
||||
{ label: 'PSL', value: 'psl' },
|
||||
{ label: '列车驾驶', value: 'drivingPlan' },
|
||||
{ label: 'CCTV', value: 'cctvView' },
|
||||
{ label: '设备视图', value: 'jl3dModle' },
|
||||
{ label: '数字沙盘', value: 'digitalStand' },
|
||||
{ label: '车务终端', value: 'trafficTerminal' },
|
||||
{ label: '车务管理终端', value: 'trafficManageTerminal' },
|
||||
{ label: '调度命令', value: 'dispatchingCommand' },
|
||||
{ label: '调度计划', value: 'schedulingPlan' },
|
||||
{ label: '大客流策略', value: 'largePassengerStrategy' },
|
||||
{ label: '大客流视图', value: 'largePassengerView' },
|
||||
{ label: '行调台', value: 'dispatcherManage' },
|
||||
{ label: '派班工作站', value: 'scheduleWork' },
|
||||
{ label: '应急调度', value: 'emergency' },
|
||||
{ label: '运行图加载', value: 'diagramLoad' },
|
||||
{ label: '运行图预览', value: 'diagramPreview' },
|
||||
{ label: '运行图编制', value: 'diagramEdit' }
|
||||
];
|
||||
return {
|
||||
visible: false,
|
||||
clientList: clientList,
|
||||
title: '',
|
||||
trainingName: '',
|
||||
mapSystemId: '',
|
||||
@ -154,8 +130,9 @@ export default {
|
||||
frontTableData: [
|
||||
{ key: 'singleMember', label: '是否单角色', value: false, type: 'checkbox' },
|
||||
{ key: 'singleClient', label: '是否单客户端', value: false, type: 'checkbox' },
|
||||
{ key: 'client', label: '初始客户端', value: '', type: 'select', optionList: clientList},
|
||||
{ key: 'client', label: '初始客户端', value: '', type: 'select', optionList: ClientList},
|
||||
{ key: 'hasTraining', label: '是否有实训', value: false, type: 'checkbox'},
|
||||
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
|
||||
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
|
||||
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
|
||||
{ key: 'hasLpf', label: '是否有大客流', value: false, type: 'checkbox' },
|
||||
@ -363,8 +340,9 @@ export default {
|
||||
this.frontTableData = [
|
||||
{ key: 'singleMember', label: '是否单角色', value: false, type: 'checkbox' },
|
||||
{ key: 'singleClient', label: '是否单客户端', value: false, type: 'checkbox' },
|
||||
{ key: 'client', label: '初始客户端', value: '', type: 'select', optionList: this.clientList},
|
||||
{ key: 'client', label: '初始客户端', value: '', type: 'select', optionList: ClientList},
|
||||
{ key: 'hasTraining', label: '是否有实训', value: false, type: 'checkbox'},
|
||||
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
|
||||
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
|
||||
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
|
||||
{ key: 'hasLpf', label: '是否有大客流', value: false, type: 'checkbox' },
|
||||
|
Loading…
Reference in New Issue
Block a user