rt-sim-training-client/src/views/trainingManage/demonMenu.vue

110 lines
2.5 KiB
Vue
Raw Normal View History

2022-08-18 15:35:10 +08:00
<template>
<div>
<div class="display_top_draft">
<div class="btn_hover" @click="menuClick">菜单</div>
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:${btnWidth}px`">
<el-button size="small" @click="showList">实训列表</el-button>
</el-button-group>
</div>
2022-08-23 15:42:24 +08:00
<TrainingList ref="trainingList" @updateDetails="updateDetails" />
2022-08-29 11:06:11 +08:00
<EditDetails ref="editDetails" v-dialogDrag :edit-data="editData" @openEditOperate="openEditOperate" />
<edit-operate ref="editOperate" v-dialogDrag @backStepList="backStepList" />
2022-08-18 15:35:10 +08:00
</div>
</template>
<script>
import TrainingList from './trainingList.vue';
2022-08-23 15:42:24 +08:00
import EditDetails from './editDetails.vue';
2022-08-29 11:06:11 +08:00
import EditOperate from './editOperate.vue';
2022-08-23 15:17:21 +08:00
2022-08-18 15:35:10 +08:00
export default {
name:'DemonMenu',
components:{
2022-08-22 13:43:40 +08:00
TrainingList,
2022-08-29 11:06:11 +08:00
EditDetails,
EditOperate
2022-08-18 15:35:10 +08:00
},
props:{
},
data() {
return {
hoverBtn: false,
2022-08-23 15:17:21 +08:00
btnWidth: -600,
editData: {}
2022-08-18 15:35:10 +08:00
};
},
computed:{
group() {
return this.$route.query.group;
},
mapId() {
return this.$route.query.mapId;
},
lineCode() {
return this.$route.query.lineCode;
}
},
mounted() {
},
methods:{
menuClick() {
this.hoverBtn = !this.hoverBtn;
if (this.hoverBtn) {
this.btnWidth = 0; // 默认宽度
} else {
this.btnWidth = -600;
}
},
showList() {
this.$refs.trainingList.doShow();
2022-08-22 13:43:40 +08:00
},
2022-08-23 15:42:24 +08:00
updateDetails(data) {
2022-08-23 15:17:21 +08:00
this.editData = data;
2022-08-23 15:42:24 +08:00
this.$refs.editDetails.doShow(data);
2022-08-29 11:06:11 +08:00
},
openEditOperate(data) {
console.log(data, '***');
this.$refs.editOperate.doShow(data);
},
backStepList(data) {
this.$refs.editDetails.setOperations(data);
this.$refs.editDetails.minisize();
2022-08-18 15:35:10 +08:00
}
}
};
</script>
<style lang="scss" scoped>
2022-08-23 15:17:21 +08:00
/deep/ .el-dialog__wrapper{
overflow: hidden;
}
2022-08-18 15:35:10 +08:00
.display_top_draft{
position: absolute;
left: 5px;
top: 15px;
height: 32px;
overflow: hidden;
padding-left: 44px;
z-index: 35;
.btn_hover{
position: absolute;
left: 0;
top: 0;
z-index: 2;
color: #4e4d4d;
font-size: 14px;
background: #fff;
padding: 8px;
border-radius: 5px;
display: block;
cursor: pointer;
float: left;
height: 32px;
}
.button_group_box{
float: left;
transition: all 0.5s;
overflow: hidden;
}
}
</style>