rt-sim-training-client/src/views/iscs/iscsDesign/index.vue

129 lines
2.9 KiB
Vue
Raw Normal View History

2020-01-15 10:11:26 +08:00
<template>
<div class="app-wrapper">
2020-10-13 14:08:47 +08:00
<div class="left-card" :class="{'hide': viewShow}">
<div class="btn_right_box" @click="clickLeftBtn"><i :class="viewShow?'el-icon-arrow-right':'el-icon-arrow-left'" /></div>
<div class="examList" style="width:100%">
<demon-list ref="demonList" @createMap="createMap" />
</div>
</div>
2020-01-15 10:11:26 +08:00
<transition>
<router-view />
</transition>
<context-menu />
2020-10-13 14:08:47 +08:00
<map-create ref="mapCreate" :line-code="lineCode" @refresh="refresh" />
2020-01-15 10:11:26 +08:00
</div>
</template>
<script>
import demonList from './demonList';
import { launchFullscreen } from '@/utils/screen';
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
import MapCreate from './mapmanage/create';
import ContextMenu from './contextMenu';
2020-01-15 10:11:26 +08:00
export default {
name: 'DesignPlatform',
components: {
demonList,
MapCreate,
ContextMenu
2020-01-15 10:11:26 +08:00
},
data() {
return {
2020-10-13 14:08:47 +08:00
lineCode: '',
viewShow: false,
widthLeft: 450
2020-01-15 10:11:26 +08:00
};
},
computed: {
width() {
return this.$store.state.app.width;
}
},
watch: {
'$store.state.app.windowSizeCount': function() {
this.resize();
}
},
2020-01-15 13:27:07 +08:00
created() {
this.resize();
},
2020-01-15 10:11:26 +08:00
mounted() {
const againEnter = getSessionStorage('againEnter') || null;
if (!againEnter) {
launchFullscreen();
setSessionStorage('againEnter', true);
}
},
methods: {
refresh() {
this.$refs && this.$refs.demonList && this.$refs.demonList.loadInitData();
},
createMap() {
this.$refs.mapCreate.show();
},
2020-01-15 10:11:26 +08:00
resize() {
2020-10-13 14:08:47 +08:00
const width = this.$store.state.app.width;
2020-01-15 10:11:26 +08:00
const height = this.$store.state.app.height - 90;
this.$store.dispatch('config/resize', { width: width, height: height });
},
setMapResize(LeftWidth) {
2020-10-13 14:08:47 +08:00
const width = this.$store.state.app.width;
2020-02-05 15:15:53 +08:00
const height = this.$store.state.app.height - 90;
this.$store.dispatch('config/resize', { width: width, height: height });
2020-10-13 14:08:47 +08:00
},
clickLeftBtn() {
this.viewShow = !this.viewShow;
}
2020-01-15 10:11:26 +08:00
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
overflow: hidden;
}
2020-10-13 14:08:47 +08:00
.left-card{
width: 470px;
height: 100%;
position: absolute;
left: 0;
transform: translateX(-470px);
transition: all 0.5s;
background: #fff;
z-index: 9;
/deep/{
.v-modal{
opacity: 0;
}
}
&.hide{
transform: translateX(0);
}
.examList {
float: left;
height: 100%;
}
.btn_right_box{
position: absolute;
right: 0;
top: 50%;
padding: 8px 3px;
background: #fff;
z-index: 10;
transform: translateX(22px);
cursor: pointer;
border-radius: 0 5px 05px 0;
}
2020-01-15 10:11:26 +08:00
}
</style>