rt-sim-training-client/src/views/demonstration/deomonTopic/index.vue

86 lines
2.1 KiB
Vue
Raw Normal View History

2019-07-26 13:32:43 +08:00
<template>
2019-08-08 11:29:03 +08:00
<el-dialog
v-dialogDrag
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="height: 80px; line-height: 80px; font-size: 16px; padding-left: 10px;">{{ roomName }}邀请你加入综合演练</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleJoin">确认</el-button>
<el-button @click="dialogShow = false"> </el-button>
</span>
</el-dialog>
2019-07-26 13:32:43 +08:00
</template>
<script>
2019-08-08 11:29:03 +08:00
import { getjointTraining, putJointTrainingSimulationEntrance } from '@/api/chat';
import { getPublishMapInfo } from '@/api/jmap/map';
import { launchFullscreen } from '@/utils/screen';
2019-07-26 13:32:43 +08:00
2019-08-08 11:29:03 +08:00
export default {
name: 'DeomonList',
data() {
return {
dialogShow: false,
group: '',
roomName: '',
state: '',
mapId: ''
};
},
computed: {
show() {
return this.dialogShow;
},
title() {
return '综合演练快速入口';
}
},
mounted() {
},
methods: {
doShow(data) {
this.roomName = data.creator.nickName;
this.group = data.group;
this.state = data.state;
this.mapId = data.mapId;
this.dialogShow = true;
},
doClose() {
this.dialogShow = false;
},
async handleJoin() {
if (this.state == '02') {
launchFullscreen();
await putJointTrainingSimulationEntrance(this.group);
const rest = await getPublishMapInfo(this.mapId);
const query = { skinStyle: rest.data.skinStyle, mapId: this.mapId, group: this.group };
this.$router.push({ path: `/jointTraining`, query: query });
} else if (this.state == '01') {
const query = { group: this.group };
this.$router.push({ path: `/trainroom`, query: query });
}
this.dialogShow = false;
getjointTraining(this.group);
}
}
};
2019-07-26 13:32:43 +08:00
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ {
.el-dialog__body {
padding: 0px 30px !important;
}
.el-tree-node.is-current>.el-tree-node__content {
background-color: #e4e3e3 !important;
}
}
2019-08-08 11:29:03 +08:00
</style>