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

调整树节点上文文菜单

上级 2910756e
...@@ -259,20 +259,20 @@ import UIService from '@/uiservice/ui-service'; ...@@ -259,20 +259,20 @@ import UIService from '@/uiservice/ui-service';
/** /**
* 节点模型集合 * 树节点上下文菜单集合
* *
* @type {string[]} * @type {string[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public nodeModel: any = { public actionModel: any = {
<#if ctrl.getPSControls()??> <#if ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl> <#list ctrl.getPSControls() as childCtrl>
<#if childCtrl.getControlType() == "CONTEXTMENU"> <#if childCtrl.getControlType() == "CONTEXTMENU">
<#if childCtrl.getPSDEToolbarItems()??> <#if childCtrl.getPSDEToolbarItems()??>
<#list childCtrl.getPSDEToolbarItems() as item> <#list childCtrl.getPSDEToolbarItems() as item>
<#if !P.exists("importService", item.name, "")> <#if !P.exists("importService", item.name, "")>
${item.name}: { uiservice: "<#if childCtrl.getPSAppDataEntity()?? && childCtrl.getPSAppDataEntity().getCodeName()??>${srfclassname('${curAppEntity.getCodeName()}')}UIService</#if>"<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>,uiaction: { type: '${uiaction.getUIActionType()}', tag: '${uiaction.getUIActionTag()}' ${item.name}: {<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()> type: '${uiaction.getUIActionType()}', tag: '${uiaction.getUIActionTag()}'
<#if (uiaction.getActionTarget()!="")>, actiontarget: '${uiaction.getActionTarget()}'</#if><#if uiaction.getNoPrivDisplayMode(view)??>, noprivdisplaymode:${uiaction.getNoPrivDisplayMode(view)}</#if><#if uiaction.getDataAccessAction()??>, dataaccaction:'${uiaction.getDataAccessAction()}'</#if>, visabled: true, disabled: false}</#if>}, <#if (uiaction.getActionTarget()!="")>, actiontarget: '${uiaction.getActionTarget()}'</#if><#if uiaction.getNoPrivDisplayMode(view)??>, noprivdisplaymode:${uiaction.getNoPrivDisplayMode(view)}</#if><#if uiaction.getDataAccessAction()??>, dataaccaction:'${uiaction.getDataAccessAction()}'</#if>, visabled: true, disabled: false</#if>},
</#if> </#if>
</#list> </#list>
</#if> </#if>
...@@ -682,11 +682,12 @@ import UIService from '@/uiservice/ui-service'; ...@@ -682,11 +682,12 @@ import UIService from '@/uiservice/ui-service';
const data: any = JSON.parse(JSON.stringify(node.data)); const data: any = JSON.parse(JSON.stringify(node.data));
this.currentselectedNode = { ...data }; this.currentselectedNode = { ...data };
const tags: string[] = data.id.split(';'); const tags: string[] = data.id.split(';');
let copyActionModel:any =Util.deepCopy(this.actionModel);
<#if ctrl.getPSControls()??> <#if ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl> <#list ctrl.getPSControls() as childCtrl>
<#if childCtrl.getControlType() == "CONTEXTMENU"> <#if childCtrl.getControlType() == "CONTEXTMENU">
if (tags[0] === "${childCtrl.getOwner().getNodeType()}") { if (tags[0] === "${childCtrl.getOwner().getNodeType()}") {
content = this.renderContextMenu${srfclassname(childCtrl.getOwner().getNodeType()?lower_case)}(); content = this.renderContextMenu${srfclassname(childCtrl.getOwner().getNodeType()?lower_case)}('${childCtrl.getOwner().getTreeNodeType()}','${childCtrl.getPSAppDataEntity().getCodeName()?lower_case}',copyActionModel);
} }
</#if> </#if>
</#list> </#list>
...@@ -701,11 +702,13 @@ import UIService from '@/uiservice/ui-service'; ...@@ -701,11 +702,13 @@ import UIService from '@/uiservice/ui-service';
/** /**
* 绘制${childCtrl.getOwner().getNodeType()}类型右键菜单 * 绘制${childCtrl.getOwner().getNodeType()}类型右键菜单
* *
* @param {*} node * @param {*} nodeType 节点类型
* @param {*} appEntityName 应用实体名称
* @param {*} actionModelData 模型数据
* @returns * @returns
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public renderContextMenu${srfclassname(childCtrl.getOwner().getNodeType()?lower_case)}() { public renderContextMenu${srfclassname(childCtrl.getOwner().getNodeType()?lower_case)}(nodeType:string,appEntityName:string,actionModelData:any) {
return ( return (
<@ibizindent blank=12> <@ibizindent blank=12>
${P.getCtrlCode(childCtrl, 'CONTROL.html').code} ${P.getCtrlCode(childCtrl, 'CONTROL.html').code}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册