Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
bf5aa5e1c7
@ -103,7 +103,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(data.type == "Train_Hmi_3D"){
|
if(data.type == "Train_Hmi_3D"){
|
||||||
console.log(data.body);
|
|
||||||
updatestatus(data.body);
|
updatestatus(data.body);
|
||||||
|
|
||||||
// if(data.body.trust){
|
// if(data.body.trust){
|
||||||
|
@ -149,6 +149,15 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
|||||||
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh);
|
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh);
|
||||||
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
|
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
|
||||||
|
|
||||||
|
if(scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao") && scope.stationtexture["devicelist"]){
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["devicelist"];
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(scope.modelmanager.standmodel.mesh.getObjectByName("menkuangyanse") && scope.stationtexture["pingbimen"]){
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("menkuangyanse").material.map =scope.stationtexture["pingbimen"];
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("menkuangyanse").material.map.needsUpdate = true;
|
||||||
|
}
|
||||||
// scope.stationtexture
|
// scope.stationtexture
|
||||||
animate();
|
animate();
|
||||||
})
|
})
|
||||||
@ -243,9 +252,13 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
|||||||
scope.modelmanager.standmodel.action.time = 0;
|
scope.modelmanager.standmodel.action.time = 0;
|
||||||
scope.modelmanager.standmodel.action.timeScale = 1;
|
scope.modelmanager.standmodel.action.timeScale = 1;
|
||||||
scope.modelmanager.standmodel.action.play();
|
scope.modelmanager.standmodel.action.play();
|
||||||
|
console.log(data.standCode);
|
||||||
|
console.log(psdtexturemap);
|
||||||
|
if(psdtexturemap[data.code]){
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.code]];
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||||
|
|
||||||
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
|
}
|
||||||
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (data.type == "SECTION") {
|
if (data.type == "SECTION") {
|
||||||
@ -316,6 +329,12 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
|||||||
scope.modelmanager.standmodel.action.time = 0;
|
scope.modelmanager.standmodel.action.time = 0;
|
||||||
scope.modelmanager.standmodel.action.timeScale = 1;
|
scope.modelmanager.standmodel.action.timeScale = 1;
|
||||||
scope.modelmanager.standmodel.action.play();
|
scope.modelmanager.standmodel.action.play();
|
||||||
|
|
||||||
|
if(psdtexturemap[data.code]){
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.code]];
|
||||||
|
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||||
|
|
||||||
|
}
|
||||||
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
|
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
|
||||||
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
|||||||
let signaldata = JSON.parse(netdata.signals);
|
let signaldata = JSON.parse(netdata.signals);
|
||||||
let standsdata = JSON.parse(netdata.stands);
|
let standsdata = JSON.parse(netdata.stands);
|
||||||
let psddata = data.psdList;
|
let psddata = data.psdList;
|
||||||
|
console.log(standsdata);
|
||||||
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList);
|
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList);
|
||||||
// assetloader.setmodellistnew(netdata.assets);
|
// assetloader.setmodellistnew(netdata.assets);
|
||||||
|
|
||||||
|
@ -433,6 +433,13 @@ class Jlmap {
|
|||||||
this.$painter.update(cycleButton);
|
this.$painter.update(cycleButton);
|
||||||
}
|
}
|
||||||
} else if (elem.deviceType === 'STATION') {
|
} else if (elem.deviceType === 'STATION') {
|
||||||
|
// 如果是控制权转移消息
|
||||||
|
if (elem.applicantIdOfControlTransfer) {
|
||||||
|
store.dispatch('map/setControlTransfer', elem);
|
||||||
|
} else {
|
||||||
|
if (this.mapDevice[code].controlMode != elem.controlMode) {
|
||||||
|
store.dispatch('map/closeControlTransfer', elem);
|
||||||
|
}
|
||||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||||
const guideLock = this.mapDevice[oDevice.guideLockCode];
|
const guideLock = this.mapDevice[oDevice.guideLockCode];
|
||||||
const guideLockStatus = {totalGuideLock: elem.totalGuideLock};
|
const guideLockStatus = {totalGuideLock: elem.totalGuideLock};
|
||||||
@ -444,6 +451,8 @@ class Jlmap {
|
|||||||
} else {
|
} else {
|
||||||
this.$painter.update(oDevice);
|
this.$painter.update(oDevice);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (elem.deviceType === 'TRAIN') {
|
if (elem.deviceType === 'TRAIN') {
|
||||||
this.isUpdateShowTrainList = true;
|
this.isUpdateShowTrainList = true;
|
||||||
|
@ -117,12 +117,9 @@ export default {
|
|||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
'$store.state.socket.msgHead': function (elem) {
|
'$store.state.map.controlTransfer':function (elem) {
|
||||||
if (elem && (elem.operateType == 'CM_Apply_For_Station_Control' || elem.operateType == 'CM_Apply_For_Center_Control' || elem.operateType == 'CM_Force_Station_Control')) {
|
if (!this.dialogShow && elem) {
|
||||||
if (elem.params.stationCodes && elem.params.stationCodes.length) {
|
|
||||||
this.doShow(elem);
|
this.doShow(elem);
|
||||||
this.sourceMemberId = elem.sourceMemberId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -172,34 +169,55 @@ export default {
|
|||||||
this.disabledAgree = this.selection.length <= 0;
|
this.disabledAgree = this.selection.length <= 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateTableData(codes) {
|
updateTableData(controlTransfer) {
|
||||||
|
const code = controlTransfer.code;
|
||||||
|
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
(codes || []).forEach(code=> {
|
|
||||||
const model = {
|
const model = {
|
||||||
code: code,
|
code: code,
|
||||||
operate: '',
|
operate: '',
|
||||||
control: { code: '', name: '' },
|
control: { code: '', name: '' },
|
||||||
target: { code: '', name: '' },
|
target: { code: '', name: '' },
|
||||||
agree: false,
|
agree: true,
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
|
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
|
||||||
if (device) {
|
if (device) {
|
||||||
const control = (device || {}).controlMode;
|
const control = (device || {}).controlMode;
|
||||||
if (control) {
|
if (control) {
|
||||||
model.control = { status: control, name: this.controlProps[control] };
|
model.control = { status: control, name: this.controlProps[control] };
|
||||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
const targetStatus = controlTransfer.apply2TheControlMode;
|
||||||
|
model.target = { status:targetStatus, name: this.controlProps[targetStatus] };
|
||||||
}
|
}
|
||||||
model.operate = device.name || '';
|
model.operate = device.name || '';
|
||||||
}
|
}
|
||||||
this.tableData.push(model);
|
this.tableData.push(model);
|
||||||
});
|
// this.tableData = [];
|
||||||
|
// (codes || []).forEach(code=> {
|
||||||
|
// const model = {
|
||||||
|
// code: code,
|
||||||
|
// operate: '',
|
||||||
|
// control: { code: '', name: '' },
|
||||||
|
// target: { code: '', name: '' },
|
||||||
|
// agree: false,
|
||||||
|
// disabled: false
|
||||||
|
// };
|
||||||
|
|
||||||
|
// const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
|
// if (device) {
|
||||||
|
// const control = (device || {}).controlMode;
|
||||||
|
// if (control) {
|
||||||
|
// model.control = { status: control, name: this.controlProps[control] };
|
||||||
|
// model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
||||||
|
// }
|
||||||
|
// model.operate = device.name || '';
|
||||||
|
// }
|
||||||
|
// this.tableData.push(model);
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
doShow(msgHead) {
|
doShow(controlTransfer) {
|
||||||
const member = this.$store.state.training.memberData[msgHead.sourceMemberId];
|
const member = this.$store.state.training.memberData[controlTransfer.applicantIdOfControlTransfer];
|
||||||
const simulationUserList = this.$store.state.training.simulationUserList;
|
const simulationUserList = this.$store.state.training.simulationUserList;
|
||||||
if (member) {
|
if (member && member.userId != this.$store.state.user.id) {
|
||||||
let info = SimulationType[member.type];
|
let info = SimulationType[member.type];
|
||||||
if (member.deviceCode) {
|
if (member.deviceCode) {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
|
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
|
||||||
@ -213,30 +231,24 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.requestInfo = info;
|
this.requestInfo = info;
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.disabledAgree = true;
|
this.disabledAgree = true;
|
||||||
this.createTimer();
|
this.createTimer();
|
||||||
this.updateTableData(msgHead.params.stationCodes);
|
this.updateTableData(controlTransfer);
|
||||||
|
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
operation: OperationEvent.StationControl.controlResponse.menu.operation
|
operation: OperationEvent.StationControl.controlResponse.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.disabledAgree = false;
|
this.disabledAgree = false;
|
||||||
if (this.dialogShow) {
|
|
||||||
this.$store.dispatch('socket/shiftMsgQueue');
|
|
||||||
}
|
|
||||||
this.count = 0;
|
this.count = 0;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
|
@ -109,20 +109,21 @@ export default {
|
|||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
'$store.state.socket.msgHead': function (elem) {
|
'$store.state.map.controlTransfer':function (elem) {
|
||||||
if (!this.dialogShow && elem && (elem.operateType == 'CM_Apply_For_Station_Control' || elem.operateType == 'CM_Apply_For_Center_Control') && !elem.success) {
|
if (!this.dialogShow && elem) {
|
||||||
if (elem.params.stationCodes && elem.params.stationCodes.length) {
|
|
||||||
this.doShow(elem);
|
this.doShow(elem);
|
||||||
this.sourceMemberId = elem.sourceMemberId;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$store.dispatch('socket/shiftMsgQueue');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.map.keyboardEnterCount': function (val) {
|
'$store.state.map.keyboardEnterCount': function (val) {
|
||||||
if (this.show && !this.disabledAgree) {
|
if (this.show && !this.disabledAgree) {
|
||||||
this.agree();
|
this.agree();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 监听弹窗关闭
|
||||||
|
'$store.state.map.closeControlTransfer':function (elem) {
|
||||||
|
if (this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -170,10 +171,10 @@ export default {
|
|||||||
this.disabledAgree = this.selection.length <= 0;
|
this.disabledAgree = this.selection.length <= 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateTableData(msgHead) {
|
updateTableData(controlTransfer) {
|
||||||
const codes = msgHead.params.stationCodes;
|
const code = controlTransfer.code;
|
||||||
|
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
(codes || []).forEach(code=> {
|
|
||||||
const model = {
|
const model = {
|
||||||
code: code,
|
code: code,
|
||||||
operate: '',
|
operate: '',
|
||||||
@ -182,29 +183,24 @@ export default {
|
|||||||
agree: true,
|
agree: true,
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
|
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
|
||||||
if (device) {
|
if (device) {
|
||||||
const control = (device || {}).controlMode;
|
const control = (device || {}).controlMode;
|
||||||
if (control) {
|
if (control) {
|
||||||
model.control = { status: control, name: this.controlProps[control] };
|
model.control = { status: control, name: this.controlProps[control] };
|
||||||
this.targetStatus = 'Center';
|
const targetStatus = controlTransfer.apply2TheControlMode;
|
||||||
if (msgHead.operateType == 'CM_Apply_For_Center_Control') {
|
model.target = { status: targetStatus, name: this.controlProps[targetStatus] };
|
||||||
this.targetStatus = 'Center';
|
|
||||||
} else if (msgHead.operateType == 'CM_Apply_For_Station_Control') {
|
|
||||||
this.targetStatus = 'Local';
|
|
||||||
}
|
|
||||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
|
||||||
}
|
}
|
||||||
model.operate = device.name || '';
|
model.operate = device.name || '';
|
||||||
}
|
}
|
||||||
this.tableData.push(model);
|
this.tableData.push(model);
|
||||||
});
|
|
||||||
},
|
},
|
||||||
doShow(msgHead) {
|
doShow(controlTransfer) {
|
||||||
const member = this.$store.state.training.memberData[msgHead.sourceMemberId];
|
const member = this.$store.state.training.memberData[controlTransfer.applicantIdOfControlTransfer];
|
||||||
const simulationUserList = this.$store.state.training.simulationUserList;
|
const simulationUserList = this.$store.state.training.simulationUserList;
|
||||||
if (member) {
|
// 不给自己弹窗,如果申请人是行值的话,只允许给所有行调弹窗,如果申请人是行调的话,只给特定的行值弹窗
|
||||||
|
if (member && member.userId != this.$store.state.user.id &&
|
||||||
|
((member.type == 'STATION_SUPERVISOR' && this.$store.state.training.roles == 'DISPATCHER') ||
|
||||||
|
(member.type == 'DISPATCHER' && this.$store.state.training.roleDeviceCode == controlTransfer.code))) {
|
||||||
let info = SimulationType[member.type];
|
let info = SimulationType[member.type];
|
||||||
if (member.deviceCode) {
|
if (member.deviceCode) {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
|
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
|
||||||
@ -218,11 +214,10 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.requestInfo = info;
|
this.requestInfo = info;
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.disabledAgree = true;
|
this.disabledAgree = true;
|
||||||
this.createTimer();
|
this.createTimer();
|
||||||
this.updateTableData(msgHead);
|
this.updateTableData(controlTransfer);
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
operation: OperationEvent.StationControl.controlResponse.menu.operation
|
operation: OperationEvent.StationControl.controlResponse.menu.operation
|
||||||
@ -233,11 +228,11 @@ export default {
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.disabledAgree = false;
|
this.disabledAgree = false;
|
||||||
this.$store.dispatch('socket/shiftMsgQueue');
|
|
||||||
|
|
||||||
this.count = 0;
|
this.count = 0;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
@ -271,10 +266,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
agree() {
|
agree() {
|
||||||
const stationCodes = [];
|
const replyVOList = [];
|
||||||
this.tableData.forEach(item => {
|
this.tableData.forEach(item => {
|
||||||
if (item.agree) {
|
if (item.agree) {
|
||||||
stationCodes.push(item.code);
|
replyVOList.push({stationCode:item.code, agree:true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -283,9 +278,7 @@ export default {
|
|||||||
send: true,
|
send: true,
|
||||||
cmdType: this.targetStatus == 'Center' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
cmdType: this.targetStatus == 'Center' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
||||||
param: {
|
param: {
|
||||||
sourceMemberId: this.sourceMemberId,
|
replyVOList: replyVOList
|
||||||
stationCodes: stationCodes,
|
|
||||||
agree: true
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -301,10 +294,10 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
refuse() {
|
refuse() {
|
||||||
const stationCodes = [];
|
const replyVOList = [];
|
||||||
this.tableData.forEach(item => {
|
this.tableData.forEach(item => {
|
||||||
if (item.agree) {
|
if (item.agree) {
|
||||||
stationCodes.push(item.code);
|
replyVOList.push({stationCode:item.code, agree:false });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -313,9 +306,7 @@ export default {
|
|||||||
send: true,
|
send: true,
|
||||||
cmdType: this.targetStatus == 'Center' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
cmdType: this.targetStatus == 'Center' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
||||||
param: {
|
param: {
|
||||||
sourceMemberId: this.sourceMemberId,
|
replyVOList: replyVOList
|
||||||
stationCodes: stationCodes,
|
|
||||||
agree: false
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -234,7 +234,9 @@ const map = {
|
|||||||
jumpStandList: [], // 跳停站台列表
|
jumpStandList: [], // 跳停站台列表
|
||||||
jumpStatus: false, // 是否有跳停状态
|
jumpStatus: false, // 是否有跳停状态
|
||||||
selectDeviceFlag: false, // 设备管理激活判断
|
selectDeviceFlag: false, // 设备管理激活判断
|
||||||
keyboardEnterCount: 0 // 键盘enter键触发
|
keyboardEnterCount: 0, // 键盘enter键触发
|
||||||
|
controlTransfer:{}, // 控制权转移消息
|
||||||
|
closeControlTransfer:0 // 关闭当前控制权转移弹窗
|
||||||
},
|
},
|
||||||
|
|
||||||
getters: {
|
getters: {
|
||||||
@ -871,6 +873,12 @@ const map = {
|
|||||||
},
|
},
|
||||||
setKeyboardEnter: (state) => {
|
setKeyboardEnter: (state) => {
|
||||||
state.keyboardEnterCount++;
|
state.keyboardEnterCount++;
|
||||||
|
},
|
||||||
|
setControlTransfer:(state, controlTransfer)=> {
|
||||||
|
state.controlTransfer = controlTransfer;
|
||||||
|
},
|
||||||
|
closeControlTransfer: (state) => {
|
||||||
|
state.closeControlTransfer++;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1072,6 +1080,12 @@ const map = {
|
|||||||
},
|
},
|
||||||
setKeyboardEnter: ({ commit }) => {
|
setKeyboardEnter: ({ commit }) => {
|
||||||
commit('setKeyboardEnter');
|
commit('setKeyboardEnter');
|
||||||
|
},
|
||||||
|
setControlTransfer:({ commit }, data) => {
|
||||||
|
commit('setControlTransfer', data);
|
||||||
|
},
|
||||||
|
closeControlTransfer:({ commit }, data) => {
|
||||||
|
commit('closeControlTransfer', data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -66,9 +66,11 @@ function handle(state, data) {
|
|||||||
case 'Simulation_PlayBack_Conversation': // 回放-用户交互消息
|
case 'Simulation_PlayBack_Conversation': // 回放-用户交互消息
|
||||||
handleSimulationInfo(state, msg);
|
handleSimulationInfo(state, msg);
|
||||||
break;
|
break;
|
||||||
case 'Simulation_ApplyHandle': // 请求处理消息
|
|
||||||
|
case 'Simulation_ApplyHandle': // 请求处理消息(旧版可能在用,新版地图不用这个)
|
||||||
handlePushMsgQueue(state, msg);
|
handlePushMsgQueue(state, msg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'JointTraining_User_Permit': // 综合演练室-用户获取权限消息
|
case 'JointTraining_User_Permit': // 综合演练室-用户获取权限消息
|
||||||
state.userPermit = msg;
|
state.userPermit = msg;
|
||||||
break;
|
break;
|
||||||
@ -183,6 +185,7 @@ function handleSimulationUserinfo(state, data) {
|
|||||||
state.simulationRoleList = (data instanceof Array) ? data : [data];
|
state.simulationRoleList = (data instanceof Array) ? data : [data];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// (旧版可能在用,新版地图不用这个)
|
||||||
function handlePushMsgQueue(state, msg) {
|
function handlePushMsgQueue(state, msg) {
|
||||||
if (msg instanceof Array) {
|
if (msg instanceof Array) {
|
||||||
state.msgQueue.concat(msg);
|
state.msgQueue.concat(msg);
|
||||||
@ -224,8 +227,8 @@ const socket = {
|
|||||||
conversationInfo: {}, // 仿真会话消息
|
conversationInfo: {}, // 仿真会话消息
|
||||||
|
|
||||||
message: {}, // 仿真聊天
|
message: {}, // 仿真聊天
|
||||||
msgQueue: [], // 命令请求列表
|
msgQueue: [], // 命令请求列表(旧版控制权转移可能在用,新版不用这个)
|
||||||
msgHead: null, // 消息头
|
msgHead: null, // 消息头(旧版控制权转移可能在用,新版不用这个)
|
||||||
|
|
||||||
userPermit: {}, // 用户获取权限消息
|
userPermit: {}, // 用户获取权限消息
|
||||||
userRoomKickOut: {}, // 用户被踢出房间消息
|
userRoomKickOut: {}, // 用户被踢出房间消息
|
||||||
@ -279,11 +282,14 @@ const socket = {
|
|||||||
state.payOrder = payOrder;
|
state.payOrder = payOrder;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// (旧版可能在用,新版地图不用这个)
|
||||||
shiftMsgQueue: (state) => {
|
shiftMsgQueue: (state) => {
|
||||||
state.msgHead = null;
|
state.msgHead = null;
|
||||||
state.msgQueue.shift();
|
state.msgQueue.shift();
|
||||||
state.msgHead = state.msgQueue[0];
|
state.msgHead = state.msgQueue[0];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// (旧版可能在用,新版地图不用这个)
|
||||||
pushMsgQueue: (state, msg) => {
|
pushMsgQueue: (state, msg) => {
|
||||||
handlePushMsgQueue(state, msg);
|
handlePushMsgQueue(state, msg);
|
||||||
},
|
},
|
||||||
@ -355,9 +361,9 @@ const socket = {
|
|||||||
commit('shiftMsgQueue');
|
commit('shiftMsgQueue');
|
||||||
},
|
},
|
||||||
|
|
||||||
pushMsgQueue: ({ commit }, msg) => {
|
// pushMsgQueue: ({ commit }, msg) => {
|
||||||
commit('pushMsgQueue', msg);
|
// commit('pushMsgQueue', msg);
|
||||||
},
|
// },
|
||||||
setRoomSubscribe:({ commit }, msg) => {
|
setRoomSubscribe:({ commit }, msg) => {
|
||||||
commit('setRoomSubscribe', msg);
|
commit('setRoomSubscribe', msg);
|
||||||
},
|
},
|
||||||
|
@ -34,6 +34,7 @@ const training = {
|
|||||||
initTime: 0, // 当前系统时间
|
initTime: 0, // 当前系统时间
|
||||||
prdType: '', // 产品类型
|
prdType: '', // 产品类型
|
||||||
roles: '', // 角色权限类型
|
roles: '', // 角色权限类型
|
||||||
|
roleDeviceCode:'', // 当前角色对应的deviceCode
|
||||||
group: '', // 设置全局 group
|
group: '', // 设置全局 group
|
||||||
centerStationCode:'', // 当前居中的集中站code
|
centerStationCode:'', // 当前居中的集中站code
|
||||||
memberList: [], // 综合仿真成员列表
|
memberList: [], // 综合仿真成员列表
|
||||||
@ -282,6 +283,9 @@ const training = {
|
|||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
setRoleDeviceCode :(state, roleDeviceCode) => {
|
||||||
|
state.roleDeviceCode = roleDeviceCode;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -698,6 +702,10 @@ const training = {
|
|||||||
/** 更新剧本所有成员列表 */
|
/** 更新剧本所有成员列表 */
|
||||||
updateMemberListInScript:({ commit }, data) => {
|
updateMemberListInScript:({ commit }, data) => {
|
||||||
commit('updateMemberListInScript', data);
|
commit('updateMemberListInScript', data);
|
||||||
|
},
|
||||||
|
/** 更新当前角色的deviceCode */
|
||||||
|
setRoleDeviceCode:({ commit }, roleDeviceCode) => {
|
||||||
|
commit('setRoleDeviceCode', roleDeviceCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-if="!dataError" class="display_top_draft" :style="{top: offset+'px'}">
|
<div v-if="!dataError" class="display_top_draft" :style="{top: offset+'px'}">
|
||||||
<div class="btn_hover" @click="menuClick">菜单</div>
|
<div class="btn_hover" @click="menuClick">菜单</div>
|
||||||
<el-button-group ref="button_group_box" class="button_group_box" :style="`transform: translateX(-${btnWidth}px)`">
|
<!-- :style="`transform: translateX(-${btnWidth}px)`" -->
|
||||||
|
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
|
||||||
<!-- 地图错误判断 -->
|
<!-- 地图错误判断 -->
|
||||||
<!-- 设备视图 -->
|
<!-- 设备视图 -->
|
||||||
<el-button v-if="isShow3dmodel && !isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
<el-button v-if="isShow3dmodel && !isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
||||||
@ -357,6 +358,7 @@ export default {
|
|||||||
// this.$refs.button_group_box.$el.clientWidth ||
|
// this.$refs.button_group_box.$el.clientWidth ||
|
||||||
this.btnWidth = 500; // 默认宽度
|
this.btnWidth = 500; // 默认宽度
|
||||||
} else {
|
} else {
|
||||||
|
// button_group_box
|
||||||
this.btnWidth = 0;
|
this.btnWidth = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -451,7 +453,8 @@ export default {
|
|||||||
float: left;
|
float: left;
|
||||||
transition: all 0.5s;
|
transition: all 0.5s;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transform: translateX(0px);
|
margin-left: -500px;
|
||||||
|
// transform: translateX(0px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -69,7 +69,7 @@ import menuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
|||||||
import IbpPlate from '@/views/ibp/ibpsystem/index';
|
import IbpPlate from '@/views/ibp/ibpsystem/index';
|
||||||
import MenuTrainList from './menuTrainList';
|
import MenuTrainList from './menuTrainList';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||||
import { loadNewMapDataByGroup } from '@/utils/loaddata';
|
import { loadNewMapDataByGroup } from '@/utils/loaddata';
|
||||||
import { clearSimulation, getSimulationInfoNew, getSimulationUserInfo, getSimulationMemberList, getAllSimulationUser } from '@/api/simulation';
|
import { clearSimulation, getSimulationInfoNew, getSimulationUserInfo, getSimulationMemberList, getAllSimulationUser } from '@/api/simulation';
|
||||||
import {getRaceUserById, getTestPaperDatail} from '@/api/competition';
|
import {getRaceUserById, getTestPaperDatail} from '@/api/competition';
|
||||||
@ -322,6 +322,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$store.dispatch('training/over');// 仿真按计划行车结束
|
this.$store.dispatch('training/over');// 仿真按计划行车结束
|
||||||
}
|
}
|
||||||
|
this.$store.dispatch('training/changeMode', {mode:TrainingMode.NORMAL});
|
||||||
} else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
|
} else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
|
||||||
this.dataError = true;
|
this.dataError = true;
|
||||||
this.$messageBox('此地图数据正在维护中,无法运行!');
|
this.$messageBox('此地图数据正在维护中,无法运行!');
|
||||||
@ -333,6 +334,7 @@ export default {
|
|||||||
const data = res.data || {};
|
const data = res.data || {};
|
||||||
this.userRole = data.type || 'AUDIENCE';
|
this.userRole = data.type || 'AUDIENCE';
|
||||||
this.deviceCode = data.deviceCode;
|
this.deviceCode = data.deviceCode;
|
||||||
|
this.$store.dispatch('training/setRoleDeviceCode', data.deviceCode);
|
||||||
this.isAdmin = data.admin;
|
this.isAdmin = data.admin;
|
||||||
|
|
||||||
const deviceVO = this.$store.state.user.projectDevice;
|
const deviceVO = this.$store.state.user.projectDevice;
|
||||||
@ -347,7 +349,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 仿真系统
|
// 仿真系统
|
||||||
async initLoadDemonData() {
|
async initLoadDemonData() {
|
||||||
// this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
|
||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
|
|
||||||
if (this.lineCode) {
|
if (this.lineCode) {
|
||||||
@ -613,6 +614,7 @@ export default {
|
|||||||
this.$refs.demonMenu.back();
|
this.$refs.demonMenu.back();
|
||||||
} else if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId) {
|
} else if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId) {
|
||||||
this.userRole = item.type || 'AUDIENCE';
|
this.userRole = item.type || 'AUDIENCE';
|
||||||
|
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
|
||||||
this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]);
|
this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (item.deviceCode) { this.setCenter(item.deviceCode); }
|
if (item.deviceCode) { this.setCenter(item.deviceCode); }
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
<!-- 地图错误判断 -->
|
<!-- 地图错误判断 -->
|
||||||
<div v-if="!dataError&&hasOneButton" class="display_top_draft" :style="{top: offset+'px'}">
|
<div v-if="!dataError&&hasOneButton" class="display_top_draft" :style="{top: offset+'px'}">
|
||||||
<div class="btn_hover" @click="menuClick">菜单</div>
|
<div class="btn_hover" @click="menuClick">菜单</div>
|
||||||
<el-button-group ref="button_group_box" class="button_group_box" :style="`transform: translateX(-${btnWidth}px)`">
|
<!-- transform: translateX(-${btnWidth}px) -->
|
||||||
|
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
|
||||||
<!-- 设备视图 -->
|
<!-- 设备视图 -->
|
||||||
<el-button v-if="isShow3dmodel && isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ $t('display.demon.deviceView') }}</el-button>
|
<el-button v-if="isShow3dmodel && isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ $t('display.demon.deviceView') }}</el-button>
|
||||||
<!-- 三维视图 / 司机视角 -->
|
<!-- 三维视图 / 司机视角 -->
|
||||||
@ -550,7 +551,8 @@ export default {
|
|||||||
float: left;
|
float: left;
|
||||||
transition: all 0.5s;
|
transition: all 0.5s;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transform: translateX(0px);
|
// transform: translateX(0px);
|
||||||
|
margin-left: -500px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.haerbin_btn_box{
|
.haerbin_btn_box{
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<jlmap-visual ref="jlmapVisual" :draft-show="draftShow" @onSelect="clickEvent" @onMenu="onContextmenu" />
|
<jlmap-visual ref="jlmapVisual" :draft-show="draftShow" @onSelect="clickEvent" @onMenu="onContextmenu" />
|
||||||
</div>
|
</div>
|
||||||
<div class="map-draft" :class="{'hide': draftShow}">
|
<div class="map-draft" :class="{'hide': draftShow}">
|
||||||
<div class="btn_left_box" @click="clickRightBtn"><i class="el-icon-arrow-left" /></div>
|
<div class="btn_left_box" @click="clickRightBtn"><i :class="draftShow?'el-icon-arrow-right':'el-icon-arrow-left'" /></div>
|
||||||
<div v-show="viewDraft == 'draft'" class="box">
|
<div v-show="viewDraft == 'draft'" class="box">
|
||||||
<map-operate
|
<map-operate
|
||||||
ref="mapOperate"
|
ref="mapOperate"
|
||||||
|
Loading…
Reference in New Issue
Block a user