diff --git a/src/views/modules/sys/app-menu-add-or-update.vue b/src/views/modules/sys/app-menu-add-or-update.vue index 5cdc2706..b5a90976 100644 --- a/src/views/modules/sys/app-menu-add-or-update.vue +++ b/src/views/modules/sys/app-menu-add-or-update.vue @@ -96,6 +96,18 @@ :readonly="true" :placeholder="$t('menu.icon')"> + + + + + + @@ -158,6 +170,7 @@ export default { menuListVisible: false, iconList: [], iconListVisible: false, + templates: [], dataForm: { id: '', type: 0, @@ -169,7 +182,8 @@ export default { permissions: '', sort: 0, icon: '', - menuCode: '' + menuCode: '', + templateId: '' } } }, @@ -197,6 +211,7 @@ export default { this.$refs['dataForm'].resetFields() this.iconList = getIconList() this.dataForm.parentName = this.$t('menu.parentNameDefault') + this.getTemplateList() this.dataForm.resourceList = [] this.getMenuList().then(() => { if (this.dataForm.id) { @@ -214,6 +229,15 @@ export default { this.menuList = res.data }).catch(() => { }) }, + // 获取子菜单模板列表 + getTemplateList () { + this.$http.get('/sys/appmenutemplate/list').then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.templates = res.data + }).catch(() => { }) + }, // 获取信息 getInfo () { this.$http.get(`/sys/appmenu/${this.dataForm.id}`).then(({ data: res }) => {