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

调整树视图界面行为数据 ---fix3

上级 39b36ba7
......@@ -730,9 +730,26 @@ ${P.getCtrlCode(childCtrl, 'CONTROL.html').code}
*/
public showContext(data:any,event:any){
let _this:any = this;
this.copyActionModel = Util.deepCopy(this.actionModel);
this.computeNodeState(data,data.nodeType,data.appEntityName).then((res:any) => {
this.copyActionModel = {};
const tags: string[] = data.id.split(';');
Object.values(this.actionModel).forEach((item:any) =>{
if(Object.is(item.nodeOwner,tags[0])){
this.copyActionModel[item.name] = item;
}
})
if(Object.keys(this.copyActionModel).length === 0){
return;
}
this.computeNodeState(data,data.nodeType,data.appEntityName).then((result:any) => {
let flag:boolean = false;
if(Object.values(result).length>0){
flag =Object.values(result).some((item:any) =>{
return item.visabled === true;
})
}
if(flag){
(_this.$refs[data.id] as any).showContextMenu(event.clientX, event.clientY);
}
});
}
......@@ -747,7 +764,7 @@ ${P.getCtrlCode(childCtrl, 'CONTROL.html').code}
*/
public async computeNodeState(node:any,nodeType:string,appEntityName:string) {
if(Object.is(nodeType,"STATIC")){
return;
return this.copyActionModel;
}
let service:any = await this.appEntityService.getService(appEntityName);
if(this.copyActionModel && Object.keys(this.copyActionModel).length > 0) {
......@@ -760,6 +777,7 @@ ${P.getCtrlCode(childCtrl, 'CONTROL.html').code}
return this.copyActionModel;
}else{
console.warn("获取数据异常");
return this.copyActionModel;
}
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册