2019-09-23 17:49:04 +08:00
|
|
|
<template>
|
2021-04-22 11:30:07 +08:00
|
|
|
<div class="trainingPlatform" :style="'padding-left:'+(widthLeft)+'px'">
|
|
|
|
<div class="trainingPubMapList" :style="{width: widthLeft+'px'}">
|
2020-04-15 15:06:51 +08:00
|
|
|
<demon-list ref="demonList" @goRoutePath="goRoutePath" />
|
2021-04-22 11:30:07 +08:00
|
|
|
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
2019-10-31 13:57:17 +08:00
|
|
|
</div>
|
|
|
|
<transition>
|
2020-11-25 13:31:36 +08:00
|
|
|
<router-view />
|
2019-10-31 13:57:17 +08:00
|
|
|
</transition>
|
2019-10-22 13:40:42 +08:00
|
|
|
</div>
|
2019-09-23 17:49:04 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-10-22 13:40:42 +08:00
|
|
|
import demonList from './demonList';
|
|
|
|
import drapLeft from '@/views/components/drapLeft/index';
|
|
|
|
import localStore from 'storejs';
|
|
|
|
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
2019-09-23 17:49:04 +08:00
|
|
|
|
2019-10-22 13:40:42 +08:00
|
|
|
export default {
|
2019-10-29 15:06:15 +08:00
|
|
|
name: 'TrainingPlatform',
|
|
|
|
components: {
|
|
|
|
demonList,
|
|
|
|
drapLeft
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2020-11-25 13:31:36 +08:00
|
|
|
widthLeft: 450
|
2019-10-29 15:06:15 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
width() {
|
|
|
|
return this.$store.state.app.width;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.widthLeft = Number(localStore.get('LeftWidth')) ? Number(localStore.get('LeftWidth')) : 450;
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
drapWidth(width) {
|
|
|
|
this.widthLeft = Number(width);
|
|
|
|
},
|
|
|
|
goRoutePath(data) {
|
|
|
|
const againEnter = getSessionStorage('againEnter') || null;
|
2022-06-20 17:44:33 +08:00
|
|
|
if (!againEnter && !this.$route.query.thirdJump) {
|
2022-10-11 15:31:46 +08:00
|
|
|
this.$router.push(`/trainingPlatform/permission/${data[0].id}?lineCode=${data[0].lineCode}`);
|
2019-10-29 15:06:15 +08:00
|
|
|
setSessionStorage('againEnter', true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-10-22 13:40:42 +08:00
|
|
|
};
|
2019-09-23 17:49:04 +08:00
|
|
|
</script>
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
@import "src/styles/mixin.scss";
|
2021-04-22 11:30:07 +08:00
|
|
|
.trainingPlatform {
|
2019-09-23 17:49:04 +08:00
|
|
|
position: relative;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
2021-04-22 11:30:07 +08:00
|
|
|
.trainingPubMapList {
|
|
|
|
position:absolute;
|
|
|
|
left:0;
|
|
|
|
top:0;
|
2019-09-25 13:05:01 +08:00
|
|
|
height: 100%;
|
2019-09-23 17:49:04 +08:00
|
|
|
}
|
|
|
|
</style>
|