Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
c432c8ffcb
@ -130,7 +130,9 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
||||
}
|
||||
if(data.type == 'Simulation_Over'){
|
||||
logout(getToken()).then(() => {
|
||||
window.location.reload();
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
}).catch(error => {
|
||||
|
||||
});
|
||||
|
@ -124,7 +124,9 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr
|
||||
}
|
||||
if(data.type == 'Simulation_Over'){
|
||||
logout(getToken()).then(() => {
|
||||
window.location.reload();
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
}).catch(error => {
|
||||
|
||||
});
|
||||
|
@ -266,6 +266,7 @@ class Painter {
|
||||
const level = this.mapInstanceLevel[type];
|
||||
if (level) {
|
||||
level.removeAll();
|
||||
this.$transformHandleScreen.removeType(type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -524,6 +524,7 @@ export default class Switch extends Group {
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
// console.log('定位>', model.normalPosition, '反位>', model.reversePosition);
|
||||
if (model.normalPosition) {
|
||||
this.setLocationAction(model); /** 定位*/
|
||||
} else if (model.reversePosition) {
|
||||
|
@ -400,8 +400,8 @@ export default class Train extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
screenShow() {
|
||||
// this.text && this.text.hide();
|
||||
this.setState(this.model);
|
||||
}
|
||||
// screenShow() {
|
||||
// // this.text && this.text.hide();
|
||||
// this.setState(this.model);
|
||||
// }
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ class TransformHandle {
|
||||
}
|
||||
}
|
||||
|
||||
// 视图进行缩放/平移
|
||||
// 视图进行初始化
|
||||
transformView(view) {
|
||||
if (view) {
|
||||
for (let i = 0; i < this.transform.length; i++) {
|
||||
@ -50,7 +50,7 @@ class TransformHandle {
|
||||
}
|
||||
}
|
||||
|
||||
// 视图进行缩放/平移
|
||||
// 视图进行平移
|
||||
transformView1(view) {
|
||||
if (view) {
|
||||
view.transform = this.transform[view.transformIndex];
|
||||
@ -104,6 +104,27 @@ class TransformHandle {
|
||||
this.transformAll1();
|
||||
}
|
||||
|
||||
removeType(type) {
|
||||
this.parentLevel.eachChild(level => {
|
||||
level.eachChild((view) => {
|
||||
if (view) {
|
||||
view.transform = this.transform[view.transformIndex];
|
||||
view.decomposeTransform();
|
||||
if (view._type == type) {
|
||||
view.hide();
|
||||
} else {
|
||||
if (view.screenShow) {
|
||||
view.screenShow();
|
||||
} else {
|
||||
view.show();
|
||||
}
|
||||
}
|
||||
view.dirty();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 更新画布尺寸
|
||||
updateZrSize(opts) {
|
||||
this.rect = { x: 0, y: 0, width: opts.width, height: opts.height };
|
||||
|
@ -70,7 +70,7 @@ function handle(state, data) {
|
||||
state.simulationStart = msg;
|
||||
break;
|
||||
case 'Simulation_Reset': // 仿真-仿真重置消息 退出计划行车
|
||||
state.simulationReset = 'reset';
|
||||
state.simulationReset += 1;
|
||||
break;
|
||||
case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令)
|
||||
handleSimulationInfo(state, msg);
|
||||
@ -221,7 +221,7 @@ const socket = {
|
||||
simulationError: 0, // 仿真-异常消息
|
||||
simulationStart: '', // 仿真-开始消息
|
||||
simulationOver:0, // 退出仿真推送消息
|
||||
simulationReset: '', // 仿真-异常消息
|
||||
simulationReset: 0, // 仿真-异常消息
|
||||
inviteOtherIntoChat:{}, // 综合演练仿真-聊天界面用户邀请其他人加入群聊推送信息
|
||||
acceptInviteChat:{}, // 综合演练仿真-聊天界面用户接受聊天邀请,
|
||||
quitCoversition:{}, // 综合演练仿真-聊天界面用户退出群聊推送消息,
|
||||
@ -335,7 +335,7 @@ const socket = {
|
||||
},
|
||||
|
||||
setSimulationReset: ({ commit }) => {
|
||||
commit('setSimulationReset', '');
|
||||
commit('setSimulationReset', 0);
|
||||
},
|
||||
|
||||
setSimulationInvite: ({ commit }) => {
|
||||
|
@ -2,10 +2,10 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { getBaseUrl } from '@/utils/baseUrl';
|
||||
import { MessageBox, Message } from 'element-ui';
|
||||
import { MessageBox } from 'element-ui';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import SockJS from 'sockjs-client';
|
||||
import Stomp from 'stompjs';
|
||||
@ -65,7 +65,7 @@ StompClient.prototype = {
|
||||
const that = this;
|
||||
this.clientIns.connect({ 'X-Token': getToken() }, () => {
|
||||
if (notFirstConnect) {
|
||||
setTimeout(()=>{ Message.success('连接成功'); });
|
||||
// setTimeout(()=>{ Message.success('连接成功'); });
|
||||
}
|
||||
console.info('连接成功.');
|
||||
that.count = 0;
|
||||
@ -78,7 +78,7 @@ StompClient.prototype = {
|
||||
|
||||
// sock断开回调
|
||||
that.clientIns.ws.onclose = () => {
|
||||
Message.error(`通信连接已断开!`);
|
||||
// Message.error(`通信连接已断开!`);
|
||||
notFirstConnect = true;
|
||||
checkLoginLine().then(() => {
|
||||
that.status = false;
|
||||
@ -121,7 +121,7 @@ StompClient.prototype = {
|
||||
// 恢复链接
|
||||
reconnect(count) {
|
||||
console.info(`尝试第${count || 1}次连接.`);
|
||||
Message.warning(`正在尝试第${count || 1}次通讯连接。`);
|
||||
// Message.warning(`正在尝试第${count || 1}次通讯连接。`);
|
||||
const that = this;
|
||||
setTimeout(() => {
|
||||
that.connect().then(() => { }).catch(() => {
|
||||
|
@ -12,7 +12,7 @@
|
||||
<!-- <el-button type="primary" @click="raystand">站台选择</el-button> -->
|
||||
<el-button type="primary" @click="cctvplane">{{ cctvbuttonmsg }}</el-button>
|
||||
<el-button type="primary" @click="showplane">{{ showbuttonmsg }}</el-button>
|
||||
<el-button type="primary" @click="back">{{$t('global.back')}}</el-button>
|
||||
<el-button type="primary" @click="back">{{backmsg}}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
||||
@ -87,6 +87,7 @@ export default {
|
||||
cctvbuttonmsg: this.$t('jlmap3d.surveillanceHidden'),
|
||||
mmishow: false,
|
||||
showbuttonmsg: this.$t('jlmap3d.trainInstrumentationDisplay'),
|
||||
backmsg:this.$t('global.back'),
|
||||
trainnum: '',
|
||||
stoptimes: '',
|
||||
dcontrolshow: false,
|
||||
@ -175,7 +176,9 @@ export default {
|
||||
window.datanew = this.datanew;
|
||||
window.updatestatus = this.updatestatus;
|
||||
|
||||
|
||||
if(this.$route.query.type == "DRIVE"){
|
||||
this.backmsg = "退出";
|
||||
}
|
||||
// this.$refs.mmiui.init();
|
||||
},
|
||||
methods: {
|
||||
@ -244,7 +247,9 @@ export default {
|
||||
back() {
|
||||
if(this.$route.query.type == "DRIVE"){
|
||||
logout(getToken()).then(() => {
|
||||
window.location.reload();
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
}).catch(error => {
|
||||
|
||||
});
|
||||
|
@ -24,7 +24,7 @@ import { runDiagramIsStart, runDiagramStart, runDiagramOver, runDiagramGetTime }
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { putJointTrainingSimulationUser } from '@/api/chat';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
// import { EventBus } from '@/scripts/event-bus';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import RealDevice from './menuDraft/realDevice';
|
||||
|
||||
@ -302,7 +302,7 @@ export default {
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
EventBus.$emit('trainView');
|
||||
// EventBus.$emit('trainView');
|
||||
runDiagramOver(this.group).catch(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.isDisable = true;
|
||||
|
@ -188,6 +188,11 @@ export default {
|
||||
}
|
||||
this.setCenter(code);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationReset': function (val) {
|
||||
if (val) {
|
||||
this.simulationReset(val);
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -335,6 +340,14 @@ export default {
|
||||
break;
|
||||
}
|
||||
},
|
||||
async simulationReset() {
|
||||
await this.$store.dispatch('map/clearJlmapTrainView');
|
||||
await this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
await this.$store.dispatch('training/over');
|
||||
await this.$store.dispatch('socket/setSimulationReset'); // 清空
|
||||
await this.$store.dispatch('socket/setSimulationStart');
|
||||
await this.$store.dispatch('training/setMapDefaultState');
|
||||
},
|
||||
// 视图缩放事件
|
||||
onDataZoom(dataZoom) {
|
||||
this.dataZoom.offsetX = dataZoom.offsetX.toFixed(1) + '';
|
||||
|
@ -471,11 +471,11 @@ export default {
|
||||
// Admin 管理员 Dispatcher 行调 STATION_SUPERVISOR 车站 Audience 观众 Driver 司机 MAINTAINER 通号 IBP:IBP盘
|
||||
switch (this.userRole) {
|
||||
// case 'ADMIN': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'ADMIN'); this.hideIbp(); break;
|
||||
case 'DISPATCHER': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'DISPATCHER'); this.hideIbp(); this.drivingShow = false;break;
|
||||
case 'STATION_SUPERVISOR': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR'); this.hideIbp();this.drivingShow = false; break;
|
||||
case 'DISPATCHER': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'DISPATCHER'); this.hideIbp(); this.drivingShow = false; break;
|
||||
case 'STATION_SUPERVISOR': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR'); this.hideIbp(); this.drivingShow = false; break;
|
||||
case 'AUDIENCE': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'AUDIENCE'); this.hideIbp(); break;
|
||||
case 'DRIVER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'DRIVER'); this.hideIbp(); break;
|
||||
case 'MAINTAINER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'MAINTAINER'); this.hideIbp();this.drivingShow = false;this.jl3dmaintainershow = true; break;
|
||||
case 'DRIVER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'DRIVER'); break;
|
||||
case 'MAINTAINER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'MAINTAINER'); this.hideIbp(); this.jl3dmaintainershow = true; break;
|
||||
}
|
||||
if (this.isAdmin && this.adminMode) {
|
||||
this.$store.dispatch('training/setPrdType', swch || '02');
|
||||
|
@ -34,7 +34,7 @@ import SetTime from '@/views/newMap/displayNew/demon/setTime';
|
||||
import { ranAsPlan, exitRunPlan, clearSimulation } from '@/api/simulation';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { getSimulationQrcode } from '@/api/jointSimulation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
// import { EventBus } from '@/scripts/event-bus';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import RealDevice from './menuDraft/realDevice';
|
||||
import { refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition';
|
||||
@ -300,7 +300,7 @@ export default {
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
EventBus.$emit('trainView');
|
||||
// EventBus.$emit('trainView');
|
||||
exitRunPlan(this.group).then(()=>{
|
||||
this.$store.dispatch('map/setRunPlanStatus', false);
|
||||
}).catch(() => {
|
||||
|
@ -44,12 +44,12 @@ export default {
|
||||
if (val) {
|
||||
this.simulationError(val);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationReset': function (val) {
|
||||
if (val) {
|
||||
this.simulationReset(val);
|
||||
}
|
||||
}
|
||||
// '$store.state.socket.simulationReset': function (val) {
|
||||
// if (val) {
|
||||
// this.simulationReset(val);
|
||||
// }
|
||||
// }
|
||||
},
|
||||
mounted() {
|
||||
window.onbeforeunload = this.clearSubscribe;
|
||||
@ -92,14 +92,14 @@ export default {
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
async simulationReset() {
|
||||
await this.$store.dispatch('map/clearJlmapTrainView');
|
||||
await this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
await this.$store.dispatch('training/over');
|
||||
await this.$store.dispatch('socket/setSimulationReset');
|
||||
await this.$store.dispatch('socket/setSimulationStart');
|
||||
await this.$store.dispatch('training/setMapDefaultState');
|
||||
},
|
||||
// async simulationReset() {
|
||||
// await this.$store.dispatch('map/clearJlmapTrainView');
|
||||
// await this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
// await this.$store.dispatch('training/over');
|
||||
// await this.$store.dispatch('socket/setSimulationReset'); // 清空
|
||||
// await this.$store.dispatch('socket/setSimulationStart');
|
||||
// await this.$store.dispatch('training/setMapDefaultState');
|
||||
// },
|
||||
async subscribe() {
|
||||
this.clearSubscribe();
|
||||
const header = { group: this.group || '', 'X-Token': getToken() };
|
||||
|
Loading…
Reference in New Issue
Block a user