Merge remote-tracking branch 'origin/test'
This commit is contained in:
commit
f9a3461c63
@ -238,3 +238,12 @@ export function getPermissionJoint(group) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
export function setRealDevice(group, data) {
|
||||
return request({
|
||||
url: `/api/jointTraining/room/realDevice?group=${group}`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
@ -122,3 +122,11 @@ export function getPublishMapDetailList(params, code) {
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取有屏蔽门的站台列表*/
|
||||
export function hasDoorStationList(mapId) {
|
||||
return request({
|
||||
url: `/api/map/${mapId}/stand/hasDoor`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -408,3 +408,20 @@ export function schedulingNotify(params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取PLC网关 */
|
||||
export function getPlcGateway(group) {
|
||||
return request({
|
||||
url: `/api/simulation/${group}/plcGateway`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 处理ibp盘事件 */
|
||||
export function handlerIbpEvent(group, data) {
|
||||
return request({
|
||||
url: `/api/simulation/${group}/ibp/event`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
@ -13,10 +13,10 @@ export default {
|
||||
forcedStationControl: 'Forced Station Control',
|
||||
toCentralControl: 'Switch Central Control',
|
||||
requestOperationArea: 'RequestOperationArea',
|
||||
historyQuery: 'HistoryQuery',
|
||||
userManage: 'UserManage',
|
||||
historyQuery: 'History',
|
||||
userManage: 'Users',
|
||||
help: 'Help',
|
||||
about: 'ControlMonitor(A)',
|
||||
about: 'About ControlMonitor(A)',
|
||||
planCarOperation: 'PlanCarOperation',
|
||||
addPlanCar: 'Add Plan Car',
|
||||
panPlanCar: 'Pan Plan Car',
|
||||
@ -184,8 +184,8 @@ export default {
|
||||
confirm: 'Confirm',
|
||||
close: 'Close',
|
||||
|
||||
jobNumber: 'JobNumber:',
|
||||
userName: 'User Name:',
|
||||
jobNumber: 'Staff ID:',
|
||||
userName: 'Name:',
|
||||
password: 'Password:',
|
||||
confirmPassword: 'Confirm Password:',
|
||||
inputJobNumber: 'Please enter job number',
|
||||
@ -220,14 +220,14 @@ export default {
|
||||
about: 'About ControlMonitor',
|
||||
|
||||
userList: 'User List',
|
||||
jobNumber: 'JobNumber',
|
||||
userName: 'UserName',
|
||||
jobNumber: 'Staff ID',
|
||||
userName: 'Name',
|
||||
refresh: 'Refresh',
|
||||
add: 'Add',
|
||||
modify: 'Modify',
|
||||
delete: 'Delete',
|
||||
cancel: 'Cancel',
|
||||
userManage: 'User Manage',
|
||||
userManage: 'Users',
|
||||
selectUser: 'Please select a user first',
|
||||
deleteMessageOne: 'Are you sure to delete user',
|
||||
deleteMessageTwo: '?',
|
||||
@ -301,9 +301,9 @@ export default {
|
||||
|
||||
trainIDDisplaySetting: 'Train ID Display Setting',
|
||||
plantrainDisplayMode: 'Plan train Display Mode',
|
||||
serviceNumber: 'Service Number',
|
||||
tripNumber: 'Train Number',
|
||||
groupNumber: 'Group Number',
|
||||
serviceNumber: 'Table No. ',
|
||||
tripNumber: 'Train Trip No.',
|
||||
groupNumber: 'Train No.',
|
||||
targetNumber: 'Target Number',
|
||||
headCodeStationDisplayMode: 'Head Code Train Display Mode',
|
||||
fontSize: 'Font Size',
|
||||
@ -317,8 +317,8 @@ export default {
|
||||
stopTime: 'Stop time',
|
||||
departureTime: 'Departure time',
|
||||
runLevel: 'Run level',
|
||||
serviceNumber: 'Service number',
|
||||
tripNumber: 'Trip number',
|
||||
serviceNumber: 'Table No.',
|
||||
tripNumber: 'Train Trip No.',
|
||||
stationName: 'Station name:',
|
||||
stationKilometerMark: 'Station kilometer mark:',
|
||||
arrivalTime2: 'Arrival time:',
|
||||
@ -479,7 +479,7 @@ export default {
|
||||
switch: 'Switch',
|
||||
activation: 'Activation',
|
||||
resection: 'Resection',
|
||||
groupNumber: 'Group number',
|
||||
groupNumber: 'Train No.',
|
||||
planTrain: 'Plan train',
|
||||
headCodeTrain: 'Head code train',
|
||||
artificialTrain: 'Artificial train',
|
||||
|
@ -27,7 +27,7 @@ export default {
|
||||
createTime: 'Creation Time',
|
||||
detail: 'Detail',
|
||||
generateRunPlan: 'Generate Daily Plan',
|
||||
generateRunjihua: 'Generate general shift schedule',
|
||||
generateRunjihua: 'Generate General Shift Schedule',
|
||||
selectTemplateRunPlan: 'Select Template Run Plan',
|
||||
pleaseSelectTemplate: 'Please Select Template Run Plan',
|
||||
selectMap: 'Select Map',
|
||||
@ -55,6 +55,7 @@ export default {
|
||||
publishVersion: 'Version',
|
||||
lessonDeleteBtn: 'Delete',
|
||||
durationMinutes: ' minutes',
|
||||
copyRunPlan: 'Copy run plan',
|
||||
|
||||
testDefinitionMaking: 'Test Definition Making',
|
||||
examRuleMaking: 'Exam Rule Making',
|
||||
|
@ -14,7 +14,7 @@ export default {
|
||||
createScriptSuccess: 'Create script success',
|
||||
createScriptFail: 'Create script failure',
|
||||
scriptDetail: 'Script Detail',
|
||||
scriptRecord: 'Record',
|
||||
scriptRecord: 'Edit',
|
||||
scriptModify: 'Modify',
|
||||
scriptDelete: 'Delete',
|
||||
getScriptFail: 'Get script information failure',
|
||||
@ -40,7 +40,7 @@ export default {
|
||||
resetDataFail: 'Reset script failure',
|
||||
|
||||
allRoles: 'All Roles',
|
||||
actors: 'Actors',
|
||||
actors: 'Actor Role',
|
||||
roleSexMale: 'Male',
|
||||
roleSexFemale: 'Female',
|
||||
selectScriptActorSuccess: 'Select script actor success',
|
||||
@ -50,9 +50,9 @@ export default {
|
||||
modifyScriptActorSexSuccess: 'Modify script actor sex success',
|
||||
modifyScriptActorSexFail: 'Modify script actor sex failure',
|
||||
|
||||
addConversition: 'Add Conversition',
|
||||
narrator: 'Narrator',
|
||||
narratorRules: 'Please select narrator',
|
||||
addConversition: 'Add Dialogue',
|
||||
narrator: 'Sender',
|
||||
narratorRules: 'Please select Sender',
|
||||
receiver: 'Receiver',
|
||||
receiverRules: 'Please select receiver',
|
||||
conversitionContent: 'Content',
|
||||
@ -67,12 +67,12 @@ export default {
|
||||
endStationRules: 'Please select end station',
|
||||
|
||||
addCommandButton: 'Add Command',
|
||||
addConversitionButton: 'Add Conversition',
|
||||
addConversitionButton: 'Add Dialogue',
|
||||
conversitionContentRules: 'Please input content',
|
||||
addCommandSucess: 'Add command sucess',
|
||||
addCommandFail: 'Add command failure',
|
||||
addConversitionSuccess: 'Add conversition success',
|
||||
addConversitionFail: 'Add conversition failure',
|
||||
addConversitionSuccess: 'Add dialogue success',
|
||||
addConversitionFail: 'Add dialogue failure',
|
||||
modifyConversitionSuccess: 'Modify conversition success',
|
||||
modifyConversitionFail: 'Modify conversition failure',
|
||||
modifyConversition: 'Modify Conversition',
|
||||
|
@ -25,5 +25,7 @@ export default {
|
||||
sending: 'sending...',
|
||||
holdAndTalk: 'Hold and talk',
|
||||
recording: 'recording...',
|
||||
sendText: 'Send text'
|
||||
sendText: 'Send text',
|
||||
left: 'left',
|
||||
right: 'right'
|
||||
};
|
||||
|
@ -25,5 +25,7 @@ export default {
|
||||
sending: '发送中...',
|
||||
holdAndTalk: '按住说话',
|
||||
recording: '录音中...',
|
||||
sendText: '发送文字'
|
||||
sendText: '发送文字',
|
||||
left: '左',
|
||||
right: '右'
|
||||
};
|
||||
|
File diff suppressed because one or more lines are too long
@ -16,7 +16,7 @@ class IbpPan {
|
||||
this.methods = opts.methods;
|
||||
|
||||
// 鼠标事件
|
||||
this.events = { __Pan: 'pan', Contextmenu: 'contextmenu'};
|
||||
this.events = { __Pan: 'pan', Selected: 'selected', Contextmenu: 'contextmenu'};
|
||||
|
||||
// 设备数据
|
||||
this.ibpDevice = {};
|
||||
@ -180,7 +180,22 @@ class IbpPan {
|
||||
|
||||
if (this.methods.stateUpdate instanceof Function) { this.methods.stateUpdate(list); }
|
||||
}
|
||||
setStatus(code, model) {
|
||||
const oDevcie = this.ibpDevice[code].instance;
|
||||
oDevcie.setStatus(model);
|
||||
}
|
||||
setDeviceStatus(list) {
|
||||
const deviceList = Object.values(this.ibpDevice);
|
||||
console.log(list, deviceList);
|
||||
deviceList.forEach(elem =>{
|
||||
(list || []).forEach(it =>{
|
||||
if (elem.model.linkDevice === it.code) {
|
||||
elem.instance.setStatus(it);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
drawIbpInit() {
|
||||
this.$mouseController.setAllowDragging(true);
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ class EventModel {
|
||||
if (Object.values(deviceType).includes(view._type)) {
|
||||
this.deviceCode = view._code;
|
||||
this.deviceType = view._type;
|
||||
this.deviceModel = view.model;
|
||||
this.eventTarget = view;
|
||||
break;
|
||||
}
|
||||
@ -36,6 +37,7 @@ class MouseController extends Eventful {
|
||||
if (zr) {
|
||||
zr.on('contextmenu', this.contextmenu, this);
|
||||
zr.on('mousemove', this.moveEvent, this);
|
||||
zr.on('click', this.click, this);
|
||||
|
||||
this.enable = function (opts) {
|
||||
opts = opts || {};
|
||||
@ -62,6 +64,7 @@ class MouseController extends Eventful {
|
||||
};
|
||||
|
||||
this.dispose = function () {
|
||||
zr.off('click', this.click);
|
||||
zr.off('contextmenu', this.contextmenu);
|
||||
zr.off('mousemove', this.moveEvent);
|
||||
this.disable();
|
||||
@ -141,7 +144,10 @@ class MouseController extends Eventful {
|
||||
var em = this.checkEvent(e);
|
||||
this.trigger(this.events.Contextmenu, em);
|
||||
}
|
||||
|
||||
click(e) {
|
||||
var em = this.checkEvent(e);
|
||||
this.trigger(this.events.Selected, em);
|
||||
}
|
||||
moveEvent(e) {
|
||||
const newEm = new EventModel(e);
|
||||
const trainDetails = store.state.map.trainDetails;
|
||||
|
@ -86,20 +86,20 @@ export default class button extends Group {
|
||||
}
|
||||
|
||||
onclick() {
|
||||
if (!this.model.draggable) {
|
||||
switch (this.model.status) {
|
||||
case 'off': {
|
||||
this.open();
|
||||
this.model.status='on';
|
||||
break;
|
||||
}
|
||||
case 'on': {
|
||||
this.close();
|
||||
this.model.status='off';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (!this.model.draggable) {
|
||||
// switch (this.model.status) {
|
||||
// case 'off': {
|
||||
// this.open();
|
||||
// this.model.status='on';
|
||||
// break;
|
||||
// }
|
||||
// case 'on': {
|
||||
// this.close();
|
||||
// this.model.status='off';
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
// 关闭
|
||||
close() {
|
||||
|
@ -10,7 +10,7 @@ export default class CircularLamp extends Group {
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.z = device.model.z;
|
||||
this.create();
|
||||
this.setStatus(this.model);
|
||||
// this.setStatus(this.model);
|
||||
}
|
||||
|
||||
create() {
|
||||
@ -39,9 +39,9 @@ export default class CircularLamp extends Group {
|
||||
this.lamp.setStyle({fill: color});
|
||||
}
|
||||
setStatus(model) {
|
||||
if (model.switch === 'on') {
|
||||
if ( model.holdStatus === '02'|| model.holdStatus === '03'|| model.holdStatus === '04') {
|
||||
this.setCircularLampColor('#D8FCF2');
|
||||
} else {
|
||||
} else if (model.holdStatus === '01') {
|
||||
this.setCircularLampColor('#332C22');
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import LangStorage from '@/utils/lang';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
@ -54,6 +55,8 @@ class ESwName extends Group {
|
||||
}
|
||||
});
|
||||
|
||||
const data=LangStorage.getLang() == 'en'?'Turnout section':'道岔区段名称';
|
||||
|
||||
this.arrowText = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 20,
|
||||
@ -63,9 +66,9 @@ class ESwName extends Group {
|
||||
fontSize: style.arrowFontSize,
|
||||
fontWeight: style.Switch.text.fontWeight,
|
||||
fontFamily: style.fontFamily,
|
||||
text: `道岔区段名称: ${model.sectionName}`,
|
||||
text: `${data}: ${model.sectionName}`,
|
||||
textFill: '#000',
|
||||
textAlign: 'letf',
|
||||
textAlign: 'left',
|
||||
textPadding: 3,
|
||||
textBackgroundColor: style.tipBackgroundColor
|
||||
}
|
||||
|
@ -11,11 +11,11 @@ class EMouse extends Group {
|
||||
create() {
|
||||
let destinationText = '';
|
||||
switch (this.device.model.destinationStatus) {
|
||||
case '01': destinationText = LangStorage.getLang() == 'en' ? 'fiducial point' : '准点'; break;
|
||||
case '02': destinationText = LangStorage.getLang() == 'en' ? 'soon' : '早点'; break;
|
||||
case '03': destinationText = LangStorage.getLang() == 'en' ? 'Severe early' : '严重早点'; break;
|
||||
case '04': destinationText = LangStorage.getLang() == 'en' ? 'behind schedule' : '晚点'; break;
|
||||
case '05': destinationText = LangStorage.getLang() == 'en' ? 'Serious delays' : '严重晚点'; break;
|
||||
case '01': destinationText = LangStorage.getLang() == 'en' ? 'on time' : '准点'; break;
|
||||
case '02': destinationText = LangStorage.getLang() == 'en' ? 'early' : '早点'; break;
|
||||
case '03': destinationText = LangStorage.getLang() == 'en' ? 'early seriously' : '严重早点'; break;
|
||||
case '04': destinationText = LangStorage.getLang() == 'en' ? 'late' : '晚点'; break;
|
||||
case '05': destinationText = LangStorage.getLang() == 'en' ? 'late seriously ' : '严重晚点'; break;
|
||||
default: destinationText = LangStorage.getLang() == 'en' ? 'unknown' : '未知'; break;
|
||||
}
|
||||
let trainType = '';
|
||||
@ -27,7 +27,7 @@ class EMouse extends Group {
|
||||
}
|
||||
let text = '';
|
||||
if (LangStorage.getLang() == 'en') {
|
||||
text = ` The train type: ${trainType} \n table number: ${this.device.model.serviceNumber} \n Train no: ${this.device.model.tripNumber}\n Destination: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n The number of: ${this.device.model.groupNumber}\n Point in the morning and evening: ${destinationText}\n moving direction: ${this.device.model.directionType == '02' ? 'up' : 'down'}\n Crew: \n The station name: \n The terminal name: \n Take up the orbit: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n In the station: \n train-ground communication: normal \n Run level: 4 \n Button vehicle state: ${this.device.model.runControlStatus == '01' ? 'normal' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n Stationary state: ${this.device.model.runStatus == '02' ? 'Has not stopped' : 'come to a standstill'}\n blocked state: no \n train speed: ${this.device.model.speed || 0} km/h \n Authorized distance of train movement: ${this.device.model.maLen || 0} m`;
|
||||
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${this.device.model.directionType == '02' ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n Current Station: \n train-ground communication: normal \n Operational Mode: 4 \n Detained: ${this.device.model.runControlStatus == '01' ? 'normal' : this.device.model.runControlStatus == '03' ? 'Jump' : 'Detain'}\n Stationary: ${this.device.model.runStatus == '02' ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
|
||||
} else {
|
||||
text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.runControlStatus == '01' ? '正常' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${this.device.model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
|
||||
}
|
||||
|
@ -711,7 +711,7 @@ export default {
|
||||
$height: 30px;
|
||||
$menuPadding: 10px;
|
||||
$menuItemHeight: 30px;
|
||||
$menuItemWidth: 180px;
|
||||
$menuItemWidth: 190px;
|
||||
$menuItemPadding: 5px;
|
||||
|
||||
#menuBar {
|
||||
|
@ -80,7 +80,7 @@ export default {
|
||||
{label: '行值', value: 'Attendant', enLabel: 'Attendant '},
|
||||
{label: '观众', value: 'Audience', enLabel: 'Audience '},
|
||||
{label: '司机', value: 'Driver', enLabel: 'Driver '},
|
||||
{label: '通号', value: 'Repair', enLabel: 'Repair '}
|
||||
{label: '通号', value: 'Repair', enLabel: 'Repairman '}
|
||||
],
|
||||
|
||||
SimulationType: [
|
||||
|
@ -1,3 +1,12 @@
|
||||
/**
|
||||
* 真实设备类型
|
||||
*/
|
||||
export const RealDeviceType = {
|
||||
Section: '区段',
|
||||
Switch: '道岔',
|
||||
Signal: '信号机',
|
||||
ScreenDoor: '屏蔽门'
|
||||
};
|
||||
/**
|
||||
* 权限类型
|
||||
*/
|
||||
@ -2174,3 +2183,12 @@ export function checkOperationIsCurrentOperate(operation, operate) {
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* ibp操作
|
||||
*/
|
||||
export const IbpOperation = {
|
||||
Up_Hold_Train: {operate: '01', status: 'on'},
|
||||
Up_Cancel_Hold_Train: {operate: '02', status: 'off'},
|
||||
Down_Hold_Train: {operate: '03', status: 'on'},
|
||||
Down_Cancel_Hold_Train: {operate: '04', status: 'off'}
|
||||
};
|
||||
|
@ -88,6 +88,9 @@ function handle(state, data) {
|
||||
case 'Simulation_Quest_Finish': // 任务结束标志
|
||||
state.tipOperateCount++;
|
||||
break;
|
||||
case 'JointTraining_Device':
|
||||
handleDeviceInfo(state, msg);
|
||||
break;
|
||||
case 'Simulation_Control_Pause': // 暂停中
|
||||
store.dispatch('scriptRecord/updateSimulationPause', msg);
|
||||
}
|
||||
@ -182,6 +185,11 @@ function handleUserinfo(state, data) {
|
||||
state.roleInfo = data;
|
||||
}
|
||||
}
|
||||
function handleDeviceInfo(state, data) {
|
||||
if (data) {
|
||||
state.deviceInfo = data;
|
||||
}
|
||||
}
|
||||
function handleMessageInfo(state, type, data) {
|
||||
const message = {
|
||||
join: true,
|
||||
@ -275,7 +283,8 @@ const socket = {
|
||||
|
||||
permissionOver: {}, // 权限结束
|
||||
|
||||
tipOperateCount: 0 // 任务结束提示消息
|
||||
tipOperateCount: 0, // 任务结束提示消息
|
||||
deviceInfo: [] // 真实设备信息
|
||||
},
|
||||
|
||||
getters: {
|
||||
|
@ -13,6 +13,8 @@ import ibpData from '@/ibp/constant/ibpData';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { putJointTrainingSimulationUser } from '@/api/chat';
|
||||
import { handlerIbpEvent } from '@/api/simulation';
|
||||
import { IbpOperation } from '@/scripts/ConstDic'
|
||||
|
||||
export default {
|
||||
name: 'Ibp',
|
||||
@ -43,7 +45,8 @@ export default {
|
||||
showBackButton: true,
|
||||
initTime: '',
|
||||
started: false,
|
||||
loading: false
|
||||
loading: false,
|
||||
stationCode: '',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -53,7 +56,7 @@ export default {
|
||||
]),
|
||||
ibpId() {
|
||||
return ['ibp', (Math.random().toFixed(5)) * 100000].join('_');
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'$store.state.config.canvasSizeCount': function (val) {
|
||||
@ -73,7 +76,12 @@ export default {
|
||||
if (this.$ibp) {
|
||||
this.setClockStart(started);
|
||||
}
|
||||
}
|
||||
},
|
||||
'$store.state.socket.equipmentStatus': function (val) {
|
||||
if (val.length) {
|
||||
this.statusMessage(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.setWindowSize();
|
||||
@ -86,6 +94,7 @@ export default {
|
||||
if (!deviceCode) {
|
||||
return;
|
||||
}
|
||||
this.stationCode = deviceCode;
|
||||
document.getElementById(this.ibpId).oncontextmenu = function (e) {
|
||||
return false;
|
||||
};
|
||||
@ -116,6 +125,9 @@ export default {
|
||||
});
|
||||
Vue.prototype.$ibp = this.$ibp;
|
||||
this.$ibp.on('contextmenu', this.onContextMenu, this);
|
||||
if (this.$route.query.group) {
|
||||
this.$ibp.on('selected', this.onSelected, this);
|
||||
}
|
||||
this.setMap(data,ibpData[deviceCode]);
|
||||
this.$store.dispatch('ibp/setIbpData', ibpData[deviceCode]);
|
||||
this.initClockTime(this.initTime);
|
||||
@ -128,6 +140,10 @@ export default {
|
||||
},
|
||||
// 点击选择事件
|
||||
onSelected(em) {
|
||||
if (em.deviceModel.mean) {
|
||||
const params = { operate:IbpOperation[em.deviceModel.mean].operate,stationCode:this.stationCode };
|
||||
handlerIbpEvent(this.$route.query.group,params);
|
||||
}
|
||||
},
|
||||
// 右键点击事件
|
||||
onContextMenu(em) {
|
||||
@ -178,6 +194,9 @@ export default {
|
||||
},
|
||||
handleViewLoaded() {
|
||||
this.loading = false;
|
||||
},
|
||||
statusMessage(val) {
|
||||
this.$ibp.setDeviceStatus(val);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -158,3 +158,9 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/
|
||||
.el-button+.el-button {
|
||||
margin-top: 5px;
|
||||
}
|
||||
</style>
|
||||
|
@ -185,3 +185,9 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/
|
||||
.el-button+.el-button {
|
||||
margin-top:5px;
|
||||
}
|
||||
</style>
|
||||
|
@ -172,6 +172,35 @@
|
||||
<el-button icon="el-icon-plus" circle plain @click="addingRoles('bigScreen', '增加大屏')" />
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="Scheduling">-->
|
||||
<!--<p class="title">真实设备-<span>{{hasPlc?'[PLC网关在线]':'[PLC网关离线]'}}</span></p>-->
|
||||
<!--<ul>-->
|
||||
<!--<li v-for="(nor, index) in stationStandList" :key="index" class="selectPerson">-->
|
||||
<!--<span>{{ realDeviceType[nor.deviceType] }}</span>-->
|
||||
<!--<div style="float: right; margin-right: 15px;">-->
|
||||
<!--<el-select-->
|
||||
<!--v-model="nor.deviceCode"-->
|
||||
<!--:placeholder="$t('global.choose')"-->
|
||||
<!--size="mini"-->
|
||||
<!--:disabled="userId != roomInfo.creatorId"-->
|
||||
<!--@change="handleChangeDevice(nor, doorList, stationStandList)"-->
|
||||
<!-->-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in doorList"-->
|
||||
<!--:key="item.code"-->
|
||||
<!--:label="item.name"-->
|
||||
<!--:value="item.code"-->
|
||||
<!--:disabled="item.disabled"-->
|
||||
<!--style="margin-left: 10px"-->
|
||||
<!--/>-->
|
||||
<!--</el-select>-->
|
||||
<!--</div>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--<div v-if="userId == roomInfo.creatorId" class="add-box">-->
|
||||
<!--<el-button icon="el-icon-plus" circle plain @click="addingDevice" />-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="start-box">
|
||||
@ -254,12 +283,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getJoinTrainCode, deljointTrainRoom, putUserRoles, postRoomDetail, getJointTrainRoomUserList, putJointTrainingExit, startJointTraining, putJointTrainingSimulation, putJointTrainingSimulationEntrance } from '@/api/chat';
|
||||
import { getJoinTrainCode, deljointTrainRoom, putUserRoles, postRoomDetail, getJointTrainRoomUserList, putJointTrainingExit, startJointTraining, putJointTrainingSimulation, putJointTrainingSimulationEntrance,setRealDevice } from '@/api/chat';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu,RealDeviceType } from '@/scripts/ConstDic';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { getPublishMapInfo,hasDoorStationList } from '@/api/jmap/map';
|
||||
import { getPlcGateway } from '@/api/simulation';
|
||||
import trainChat from './trainChat';
|
||||
import AddPerson from './addPerson';
|
||||
import QrCode from '@/components/QrCode';
|
||||
@ -300,6 +330,7 @@ export default {
|
||||
signalList: [],
|
||||
bigScreenList: [],
|
||||
stationList: [],
|
||||
stationStandList: [],
|
||||
ibpList: [],
|
||||
point: {
|
||||
x: 0,
|
||||
@ -309,7 +340,10 @@ export default {
|
||||
timeDemon: null,
|
||||
starting: false,
|
||||
mapId: '',
|
||||
loading: false
|
||||
loading: false,
|
||||
hasPlc: false,
|
||||
doorList: [],
|
||||
realDeviceType:RealDeviceType
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -329,7 +363,7 @@ export default {
|
||||
},
|
||||
stationListForIBP() {
|
||||
return this.stationList.map(item => {
|
||||
const elem = { value: item.code, label: item.name, children:[{value: 'left', label: '左'}, {value: 'right', label: '右'}] };
|
||||
const elem = { value: item.code, label: item.name, children:[{value: 'left', label: this.$t('trainRoom.left')}, {value: 'right', label: this.$t('trainRoom.right')}] };
|
||||
return elem;
|
||||
});
|
||||
}
|
||||
@ -371,7 +405,12 @@ export default {
|
||||
val.state = '02';
|
||||
await this.addPeopleList(val);
|
||||
}
|
||||
}
|
||||
},
|
||||
'$store.state.socket.deviceInfo': async function (val) {
|
||||
if (val) { // 分配设备信息
|
||||
await this.handlerDeviceList(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.timeDemon) {
|
||||
@ -382,6 +421,7 @@ export default {
|
||||
this.userId = this.$store.state.user.id;
|
||||
this.getRoomInfo(); // 获取房间信息 info
|
||||
this.getUserList(); // 房间人员 列表
|
||||
this.checkPlcGateway(); //PLC网关
|
||||
this.timeDemon = setInterval(() => {
|
||||
checkLoginLine();
|
||||
}, 5000 * 60);
|
||||
@ -579,6 +619,8 @@ export default {
|
||||
const resp = await getStationList(res.data.mapId);
|
||||
this.stationList = resp.data;
|
||||
this.computePermissionRest();
|
||||
// 获取屏蔽门列表
|
||||
this.handleDoorList(res.data.mapId, resp.data);
|
||||
},
|
||||
// 获取观众席list 分配角色 Admin 管理员 Instructor 教员 Dispatcher 行调 Attendant 车站 Audience 观众 Driver 司机 Repair 通号 IBP IBP盘
|
||||
async getUserList() {
|
||||
@ -848,7 +890,52 @@ export default {
|
||||
message: message,
|
||||
type: type
|
||||
});
|
||||
}
|
||||
},
|
||||
checkPlcGateway() {
|
||||
getPlcGateway(this.$route.query.group).then(resp=>{
|
||||
if(resp.data){
|
||||
this.hasPlc = true;
|
||||
}else {
|
||||
this.hasPlc = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$messageBox('查询PLC设备失败!');
|
||||
});
|
||||
},
|
||||
handleDoorList(mapId,stationList) {
|
||||
let doorList = [];
|
||||
hasDoorStationList(mapId).then(res =>{
|
||||
stationList.forEach(item => {
|
||||
res.data.forEach(it =>{
|
||||
if (item.code === it.stationCode) {
|
||||
const direction = parseInt(it.doorLocationType)%2 ===0? '上行站台':'下行站台';
|
||||
doorList.push({code:it.code,name:item.name+direction})
|
||||
}
|
||||
})
|
||||
});
|
||||
this.doorList = doorList;
|
||||
}).catch((error) => {
|
||||
this.$messageBox('获取屏蔽门列表失败!');
|
||||
})
|
||||
},
|
||||
addingDevice() {
|
||||
const roomDeviceVo = {id:'',deviceType:'ScreenDoor',deviceCode:''};
|
||||
setRealDevice(this.$route.query.group,roomDeviceVo);
|
||||
},
|
||||
handleChangeDevice(nor,doorList, stationStandList){
|
||||
setRealDevice(this.$route.query.group,nor);
|
||||
doorList.forEach(item => {
|
||||
item.disabled = false;
|
||||
stationStandList.forEach(nor => {
|
||||
if (item.code == nor.deviceCode) {
|
||||
item.disabled = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
handlerDeviceList(data) {
|
||||
this.stationStandList = [data];
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -858,7 +945,7 @@ export default {
|
||||
.Scheduling {
|
||||
.el-input__inner {
|
||||
height: 30px;
|
||||
width: 140px;
|
||||
width: 180px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user