综合演练问题调整2

This commit is contained in:
fan 2022-12-01 14:09:09 +08:00
parent fc67b87883
commit a52872de5c
9 changed files with 33 additions and 112 deletions

View File

@ -1,9 +1,8 @@
<template>
<div id="app">
<router-view />
<deomon-topic ref="deomonTopic" />
<deomon-list ref="deomonList" @enterQcode="qcodeEntry" />
<qcode ref="qcode" />
<deomon-list ref="deomonList" @enterQcode="qcodeEntry" />
<qcode ref="qcode" />
<div v-show="loading" class="AppAll">
<img v-if="project === 'login' || project === 'design'" :src="jlFavicon" class="CompanyIcon">
<img :src="loadingImg" style="width: 100%; height: 100%;">
@ -25,7 +24,6 @@
import { getToken, getUserIdKey } from '@/utils/auth';
import { getSessionStorage } from '@/utils/auth';
import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
import DeomonTopic from '@/views/demonstration/deomonTopic';
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
import LoadingImg from '@/assets/loading.gif';
import AppLoading from '@/assets/appLoading.png';
@ -37,7 +35,6 @@ import Qcode from '@/layout/components/Qcode.vue';
export default {
name: 'App',
components: {
DeomonTopic,
DeomonList,
Qcode
},
@ -54,11 +51,6 @@ export default {
};
},
watch: {
'$store.state.socket.simulationInvite': function (val) {
if (val.creator) {
this.subscribeMessage(val);
}
},
'$store.state.socket.beLogoutCount': async function(val) {
if (this.$store.state.socket.loggedOutMsg.token === getToken()) {
this.$store.dispatch('disconnect').then(()=>{
@ -130,14 +122,6 @@ export default {
window.document.oncontextmenu = function () {
return false;
};
},
subscribeMessage(res) {
if (this.$refs.deomonTopic && !window.location.href.includes('trainroom')) {
if (!(getSessionStorage('project').includes('design'))) {
this.$refs.deomonTopic.doShow(res);
}
this.$store.dispatch('socket/setSimulationInvite');
}
}
}
};

View File

@ -61,20 +61,33 @@ export default {
label: '故障解锁',
handler: this.fault,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
isDisabled: (section, work) => { if (work === 'localWork') { return this.$store.state.training.roleDeviceCode === section.stationCode; } else { return false; } },
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
},
{
label: this.$t('menu.menuSection.sectionResection'),
handler: this.split,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF,
isDisabled: section => section.cutOff === 1,
isDisabled: (section, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode === section.stationCode && section.cutOff === 1;
} else {
return section.cutOff === 1;
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
},
{
label: this.$t('menu.menuSection.sectionActive'),
handler: this.active,
cmdType: CMD.Section.CMD_SECTION_ACTIVE,
isDisabled: section => section.cutOff !== 1,
isDisabled: (section, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode === section.stationCode && section.cutOff !== 1;
} else {
return section.cutOff !== 1;
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
},
{
@ -173,7 +186,7 @@ export default {
initMenu() {
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});

View File

@ -62,7 +62,6 @@ const socket = {
userOutRoom: {}, // 用户退出房间消息
userInSimulation: {}, // 用户进入仿真消息
userBackRoom: {}, // 用户从仿真返回房间消息
simulationInvite: {}, // 用户扫码信息
roomIsSubscribe:false, // 房间是否订阅
assistantIsSubscribe:false, // 综合演练仿真聊天是否订阅
@ -163,9 +162,6 @@ const socket = {
state.msgHead = state.msgQueue[0];
}
},
setSimulationInvite: (state, simulationInvite) => {
state.simulationInvite = simulationInvite;
},
setRoomSubscribe:(state, roomIsSubscribe)=>{
state.roomIsSubscribe = roomIsSubscribe;
},
@ -424,10 +420,6 @@ const socket = {
setSimulationReset: ({ commit }) => {
commit('setSimulationReset', 0);
},
setSimulationInvite: ({ commit }, data) => {
commit('setSimulationInvite', data || {});
},
setMessage: ({ state }, data) => {
if (!state.message[data.key]) {
state.message[data.key] = [];

View File

@ -23,13 +23,13 @@ export function handlerUrl() {
let OSS_URL;
if (process.env.NODE_ENV === 'development') {
// 开发分支
// BASE_API = 'http://192.168.3.233/rtss-server';
BASE_API = 'http://192.168.3.233/rtss-server';
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://114.116.51.125/jlcloud';
// BASE_API = 'http://192.168.3.90:9000'; // 周寅
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
BASE_API = 'http://192.168.3.15:9000'; // 张赛
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
// BASE_API = 'http://192.168.3.5:9000'; // 夏增彬
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
// BASE_API = 'http://b29z135112.zicp.vip';

View File

@ -73,9 +73,6 @@ function handle(data) {
case 'Simulation_ApplyHandle': // 请求处理消息(旧版可能在用,新版地图不用这个)
store.dispatch('socket/handlePushMsgQueue', msg);
break;
case 'Simulation_Invite': // 综合演练-仿真邀请消息
store.dispatch('socket/setSimulationInvite', msg);
break;
case 'Be_Logged_Out': // 重复登录被登出
store.dispatch('socket/setLoggedOutMsg', msg);
break;

View File

@ -1,70 +0,0 @@
<template>
<el-dialog
v-dialogDrag
:title="$t('global.synthesisTrainingTitle')"
:visible.sync="dialogShow"
width="600px"
class="inviteRoom"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="inviteJoinRoom">{{ roomName }}{{ $t('global.inviteJoinRoom') }}</div>
<span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="handleJoin">{{ $t('global.confirm') }}</el-button>
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { launchFullscreen } from '@/utils/screen';
// 仿
export default {
name: 'DeomonList',
data() {
return {
dialogShow: false,
group: '',
roomName: '',
mapId: '',
lineCode: '',
loading: false
};
},
methods: {
doShow(data) {
this.roomName = data.creator.nickname;
this.group = data.group;
this.mapId = data.mapId || data.map.id;
this.lineCode = (data.map || {}).lineCode;
this.dialogShow = true;
this.loading = false;
},
doClose() {
this.dialogShow = false;
},
async handleJoin() {
try {
this.loading = true;
launchFullscreen();
const query = { lineCode: this.lineCode, mapId: this.mapId, group: this.group};
this.$router.push({path: `/display/joint`, query: query});
this.dialogShow = false;
} catch (e) {
this.$messageBox(this.$t('tip.enterTrainingRoomFailed'));
console.error(e);
} finally {
this.loading = false;
this.dialogShow = false;
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.inviteRoom .inviteJoinRoom{height: 80px;line-height: 80px;font-size: 16px;padding-left: 10px;}
.inviteRoom .el-dialog__body {padding: 0px 30px;}
</style>

View File

@ -91,7 +91,6 @@ export default {
this.back();
},
'$store.state.socket.simulationRoleList':function(val) {
console.log('**************', val);
(val || []).forEach(item => {
if (item.body.messageType === 'KICK_OUT' && item.body.userId == this.$store.state.user.id) {
this.back();
@ -222,10 +221,12 @@ export default {
this.$refs.contectUs.doShow();
},
goExam() {
this.hideMenuList();
this.$refs.selectExam.doShow();
},
//
memberManage() {
this.hideMenuList();
this.$refs.memberManage.doShow();
},
changeFlowData() {

View File

@ -220,6 +220,7 @@ export default {
this.terminalList.push(item);
}
});
console.log(this.roles, '====', this.terminalList);
},
noEvent(code) {
this.$emit('pictureChange', code);

View File

@ -249,7 +249,6 @@ export default {
if (system.paramVO && system.paramVO.domConfig && system.paramVO.domConfig.singleClient) {
query.singleClient = system.paramVO.domConfig.singleClient;
}
console.log(query, '**********');
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
@ -270,14 +269,18 @@ export default {
this.loading = true;
jointSimulationByPermission(this.ruleForm.inputGroup).then(resp => {
this.loading = false;
}).catch(error => {
const query = {
lineCode: resp.data.map.lineCode,
group: resp.data.group,
mapId: resp.data.map.id,
simType: resp.data.paramVO.type,
project: this.project
};
this.$router.push({ path: `/display/demon`, query: query });
}).catch(() => {
this.loading = false;
const errorMessage = this.isShow ? this.$t('tip.failedToAddNewRoom') : this.$t('error.scanningError');
if (error.code == 10002) {
this.$messageBox(`${errorMessage}:房间已经存在,请从快速入口进入`);
} else {
this.$messageBox(`${errorMessage}:请稍后再试`);
}
this.$messageBox(`${errorMessage}:请稍后再试`);
});
}
});