2019-07-26 13:32:43 +08:00
|
|
|
<template>
|
2019-08-08 11:29:03 +08:00
|
|
|
<el-dialog
|
|
|
|
v-dialogDrag
|
2020-11-25 13:31:36 +08:00
|
|
|
:title="$t('global.synthesisTrainingTitle')"
|
|
|
|
:visible.sync="dialogShow"
|
2019-08-08 11:29:03 +08:00
|
|
|
width="600px"
|
2021-04-22 10:52:48 +08:00
|
|
|
class="inviteRoom"
|
2019-08-08 11:29:03 +08:00
|
|
|
:before-close="doClose"
|
|
|
|
:z-index="2000"
|
|
|
|
:modal="false"
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
>
|
2020-12-15 13:35:38 +08:00
|
|
|
<div class="inviteJoinRoom">{{ roomName }}{{ $t('global.inviteJoinRoom') }}</div>
|
2019-08-08 11:29:03 +08:00
|
|
|
<span slot="footer" class="dialog-footer">
|
2019-11-14 13:59:33 +08:00
|
|
|
<el-button v-loading="loading" type="primary" @click="handleJoin">{{ $t('global.confirm') }}</el-button>
|
2019-08-29 17:16:33 +08:00
|
|
|
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
|
2019-08-08 11:29:03 +08:00
|
|
|
</span>
|
|
|
|
</el-dialog>
|
2019-07-26 13:32:43 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-08-08 11:29:03 +08:00
|
|
|
import { launchFullscreen } from '@/utils/screen';
|
2020-07-10 18:41:29 +08:00
|
|
|
// 仿真邀请消息
|
2019-08-08 11:29:03 +08:00
|
|
|
export default {
|
2019-10-31 17:30:24 +08:00
|
|
|
name: 'DeomonList',
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
dialogShow: false,
|
|
|
|
group: '',
|
|
|
|
roomName: '',
|
2019-11-14 13:59:33 +08:00
|
|
|
mapId: '',
|
2020-06-30 18:35:57 +08:00
|
|
|
lineCode: '',
|
2019-11-14 13:59:33 +08:00
|
|
|
loading: false
|
2019-10-31 17:30:24 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
doShow(data) {
|
2020-07-01 18:52:29 +08:00
|
|
|
this.roomName = data.creator.nickname;
|
2019-10-31 17:30:24 +08:00
|
|
|
this.group = data.group;
|
2020-07-13 14:34:56 +08:00
|
|
|
this.mapId = data.mapId || data.map.id;
|
|
|
|
this.lineCode = (data.map || {}).lineCode;
|
2019-10-31 17:30:24 +08:00
|
|
|
this.dialogShow = true;
|
2019-11-14 13:59:33 +08:00
|
|
|
this.loading = false;
|
2019-10-31 17:30:24 +08:00
|
|
|
},
|
|
|
|
doClose() {
|
|
|
|
this.dialogShow = false;
|
|
|
|
},
|
|
|
|
async handleJoin() {
|
2019-11-14 13:59:33 +08:00
|
|
|
try {
|
|
|
|
this.loading = true;
|
2020-10-26 11:07:49 +08:00
|
|
|
launchFullscreen();
|
|
|
|
const query = { lineCode: this.lineCode, mapId: this.mapId, group: this.group};
|
|
|
|
this.$router.push({path: `/jointTrainingNew`, query: query});
|
2019-11-14 13:59:33 +08:00
|
|
|
this.dialogShow = false;
|
|
|
|
} catch (e) {
|
2020-03-23 16:00:28 +08:00
|
|
|
this.$messageBox(this.$t('tip.enterTrainingRoomFailed'));
|
2019-11-14 13:59:33 +08:00
|
|
|
console.error(e);
|
|
|
|
} finally {
|
|
|
|
this.loading = false;
|
2020-03-23 16:00:28 +08:00
|
|
|
this.dialogShow = false;
|
2019-10-31 17:30:24 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-08-08 11:29:03 +08:00
|
|
|
};
|
2019-07-26 13:32:43 +08:00
|
|
|
</script>
|
|
|
|
|
2021-04-22 10:52:48 +08:00
|
|
|
<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;}
|
2019-08-08 11:29:03 +08:00
|
|
|
</style>
|