This commit is contained in:
joylink_zhaoerwei 2024-03-07 17:12:06 +08:00
parent d17dc79e24
commit bb8e6938a6

View File

@ -13,7 +13,8 @@
background-color="#ffffff00"
text-color="#fff"
active-text-color="#ffd04b"
:default-openeds="[defaultIndex]"
:default-openeds="defaultOpenIndex"
:default-active="defaultIndex"
@open="handleOpen"
>
<el-submenu v-for="season in seasonMenu" :key="season.seasonId" :index="season.seasonId+''" @click="showPaperDetail(season)">
@ -44,7 +45,8 @@ export default {
},
seasonOptions:[],
seasonMenu:[],
defaultIndex: ''
defaultIndex: '',
defaultOpenIndex:[]
};
},
mounted() {
@ -55,13 +57,15 @@ export default {
getPaperMenu({ group:this.formModel.group}).then((res) => {
this.seasonMenu = res.data.menu;
this.$emit('changeModuleData', null, this.seasonMenu[0]);
this.defaultIndex = this.seasonMenu[0].seasonId + '';
this.defaultOpenIndex = [this.seasonMenu[0].seasonId + ''];
this.defaultIndex = '';
this.loading = false;
}).catch(error => {
this.$message.error(error.message);
});
},
handleOpen(key) {
this.defaultIndex = '';
const seasonData = this.seasonMenu.find(season=>season.seasonId == key);
this.$emit('changeModuleData', null, seasonData);
},