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