提交 7f9917d6 编写于 作者: tony001's avatar tony001

调整菜单逻辑

上级 1868e558
...@@ -118,6 +118,7 @@ ...@@ -118,6 +118,7 @@
<#assign import_block> <#assign import_block>
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model'; import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
import { Environment } from '@/environments/environment'; import { Environment } from '@/environments/environment';
import AuthService from '@/authservice/auth-service';
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
...@@ -287,6 +288,15 @@ import { Environment } from '@/environments/environment'; ...@@ -287,6 +288,15 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public counterdata: any = {}; public counterdata: any = {};
/**
* 建构权限服务对象
*
* @type {AuthService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public authService:AuthService = new AuthService({ $store: this.$store });
/** /**
* vue 生命周期 * vue 生命周期
* *
...@@ -549,7 +559,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code} ...@@ -549,7 +559,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
*/ */
public computedEffectiveMenus(inputMenus:Array<any>){ public computedEffectiveMenus(inputMenus:Array<any>){
inputMenus.forEach((_item:any) =>{ inputMenus.forEach((_item:any) =>{
if(!this.$store.getters['authresource/getAuthMenu'](_item)){ if(!this.authService.getMenusPermission(_item)){
_item.hidden = true; _item.hidden = true;
if (_item.items && _item.items.length > 0) { if (_item.items && _item.items.length > 0) {
this.computedEffectiveMenus(_item.items); this.computedEffectiveMenus(_item.items);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册