提交 4beb2b81 编写于 作者: Mosher's avatar Mosher

add:新增门户部件统一资源权限识别

上级 cb783f75
<template>
<ion-row>
<ion-row v-show="showPortlet">
<ion-list class='app-mob-portlet <#if appde??>${appde.getCodeName()?lower_case}-${ctrl.name}</#if> <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>'>
<#if ctrl.isShowTitleBar()>
<ion-list-header v-if="editTitle" class='app-mob-portlet__header'>
......
......@@ -77,6 +77,22 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/ap
*/
public selectStatus:boolean = false
/**
* 是否显示门户部件
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public showPortlet: boolean = true;
/**
* 门户部件统一资源标识
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public resourceTag: string = '<#if ctrl.getPSSysUniRes?? && ctrl.getPSSysUniRes()?? && ctrl.getPSSysUniRes().getResCode?? && ctrl.getPSSysUniRes().getResCode()??>${ctrl.getPSSysUniRes().getResCode()}</#if>';
/**
* 选择器状态取消事件
*/
......@@ -170,12 +186,39 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/ap
if (!Object.is(tag, this.name)) {
return;
}
const refs: any = this.$refs;
Object.keys(refs).forEach((name: string) => {
this.viewState.next({ tag: name, action: action, data: data });
});
this.initShowPortlet();
if (this.showPortlet) {
const refs: any = this.$refs;
Object.keys(refs).forEach((name: string) => {
this.viewState.next({ tag: name, action: action, data: data });
});
}
});
}
this.initShowPortlet();
}
/**
* 初始化门户部件显示状态
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public initShowPortlet() {
if (Environment.enablePermissionValid) {
this.showPortlet = this.computeResourceAuth();
}
}
/**
* 计算门户部件统一资源权限
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public computeResourceAuth(): boolean {
if(!this.$store.getters['authresource/getEnablePermissionValid']) {
return true;
}
return this.$store.getters['authresource/getResourceData'](this.resourceTag);
}
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册