提交 0b9de23d 编写于 作者: Mosher's avatar Mosher

新增数据视图操作栏界面行为权限计算

上级 b79153a5
......@@ -47,7 +47,7 @@
</div>
<div class="data-view-item-action">
<template v-for="(action,index) in Object.keys(actionModel)">
<button type="info" :key="index" @click="uiAction(item, action, $event)">
<button type="info" :key="index" v-show="item[action].visabled" :disabled="item[action].disabled" @click="uiAction(item, action, $event)">
<i :class="actionModel[action].icon" style="margin-right:2px;"></i>
<span>{{actionModel[action].caption}}</span>
</button>
......@@ -86,7 +86,7 @@
</div>
<div class="data-view-item-action">
<template v-for="(action,index) in Object.keys(actionModel)">
<button type="info" :key="index" @click="uiAction(item, action, $event)">
<button type="info" :key="index" v-show="item[action].visabled" :disabled="item[action].disabled" @click="uiAction(item, action, $event)">
<i :class="actionModel[action].icon" style="margin-right:2px;"></i>
<span>{{actionModel[action].caption}}</span>
</button>
......@@ -149,6 +149,14 @@ import CodeListService from "@/codelist/codelist-service";
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 界面UI服务对象
*
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
/**
* 获取多项数据
*
......@@ -843,6 +851,9 @@ import CodeListService from "@/codelist/codelist-service";
}
}
this.isAddBehind = false;
this.items.forEach((item: any) => {
Object.assign(item,this.getActionState(item));
})
this.$emit('load', this.items);
//在导航视图中,如已有选中数据,则右侧展开已选中数据的视图,如无选中数据则默认选中第一条
if(this.isSelectFirstDefault){
......@@ -1101,6 +1112,19 @@ import CodeListService from "@/codelist/codelist-service";
</#if>
}
/**
* 获取界面行为权限状态
*
* @param {*} data 当前列表行数据
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getActionState(data:any){
let tempActionModel:any = JSON.parse(JSON.stringify(this.actionModel));
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -134,6 +134,10 @@
button:hover{
color: #409eff;
}
button:disabled, button:disabled:hover {
cursor: no-drop;
color: #a8a8a8;
}
}
}
.isselected{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册