diff --git a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js
index 61748138c..e08a6f4ef 100644
--- a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js
+++ b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js
@@ -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 => {
});
diff --git a/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js b/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js
index 19c3a56e0..fc4977197 100644
--- a/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js
+++ b/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js
@@ -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 => {
});
diff --git a/src/jmapNew/painter.js b/src/jmapNew/painter.js
index f88631836..dc6ead919 100644
--- a/src/jmapNew/painter.js
+++ b/src/jmapNew/painter.js
@@ -266,6 +266,7 @@ class Painter {
const level = this.mapInstanceLevel[type];
if (level) {
level.removeAll();
+ this.$transformHandleScreen.removeType(type);
}
}
diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js
index cfa2851ed..7570eedb3 100644
--- a/src/jmapNew/shape/Switch/index.js
+++ b/src/jmapNew/shape/Switch/index.js
@@ -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) {
diff --git a/src/jmapNew/shape/Train/index.js b/src/jmapNew/shape/Train/index.js
index dfe61ed1b..56654d4c0 100644
--- a/src/jmapNew/shape/Train/index.js
+++ b/src/jmapNew/shape/Train/index.js
@@ -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);
+ // }
}
diff --git a/src/jmapNew/transformHandleScreen.js b/src/jmapNew/transformHandleScreen.js
index 0e3a9e549..63bf46203 100644
--- a/src/jmapNew/transformHandleScreen.js
+++ b/src/jmapNew/transformHandleScreen.js
@@ -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 };
diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js
index 683dabea1..c3e7508e7 100644
--- a/src/store/modules/socket.js
+++ b/src/store/modules/socket.js
@@ -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 }) => {
diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js
index 55d352581..778caeb7b 100644
--- a/src/utils/baseUrl.js
+++ b/src/utils/baseUrl.js
@@ -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'; // 杜康
diff --git a/src/utils/sock.js b/src/utils/sock.js
index faff9f9e4..1bc2e2cba 100644
--- a/src/utils/sock.js
+++ b/src/utils/sock.js
@@ -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(() => {
diff --git a/src/views/jlmap3d/drive/jl3ddrive.vue b/src/views/jlmap3d/drive/jl3ddrive.vue
index 033565c38..a2c0711e6 100644
--- a/src/views/jlmap3d/drive/jl3ddrive.vue
+++ b/src/views/jlmap3d/drive/jl3ddrive.vue
@@ -12,7 +12,7 @@
{{ cctvbuttonmsg }}
{{ showbuttonmsg }}
- {{$t('global.back')}}
+ {{backmsg}}
@@ -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 => {
});
diff --git a/src/views/jointTraining/menuDemon.vue b/src/views/jointTraining/menuDemon.vue
index 3b8258318..d5885c4ec 100644
--- a/src/views/jointTraining/menuDemon.vue
+++ b/src/views/jointTraining/menuDemon.vue
@@ -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;
diff --git a/src/views/newMap/jlmapNew/index.vue b/src/views/newMap/jlmapNew/index.vue
index bce07dda4..ed7c35025 100644
--- a/src/views/newMap/jlmapNew/index.vue
+++ b/src/views/newMap/jlmapNew/index.vue
@@ -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) + '';
diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue
index 0946f42c3..ac609453d 100644
--- a/src/views/newMap/jointTrainingNew/index.vue
+++ b/src/views/newMap/jointTrainingNew/index.vue
@@ -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');
diff --git a/src/views/newMap/jointTrainingNew/menuDemon.vue b/src/views/newMap/jointTrainingNew/menuDemon.vue
index ea10563b9..40331ae1c 100644
--- a/src/views/newMap/jointTrainingNew/menuDemon.vue
+++ b/src/views/newMap/jointTrainingNew/menuDemon.vue
@@ -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(() => {
diff --git a/src/views/newMap/mapsystemNew/index.vue b/src/views/newMap/mapsystemNew/index.vue
index e883eabb3..60acf6583 100644
--- a/src/views/newMap/mapsystemNew/index.vue
+++ b/src/views/newMap/mapsystemNew/index.vue
@@ -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() };