提交 b165e73a 编写于 作者: shanwewei's avatar shanwewei

sww --优化配置首页打开重定向视图

上级 2f115e11
...@@ -9,6 +9,12 @@ ...@@ -9,6 +9,12 @@
<#assign dataview = item.getPSAppView()/> <#assign dataview = item.getPSAppView()/>
public click${item.codeName}(item: any = {}) { public click${item.codeName}(item: any = {}) {
// 打开应用视图 // 打开应用视图
if(Object.is('${dataview.getViewType()?lower_case}','deredirectview')){
this.$Modal.error({
title: '首页菜单应用功能不支持打开重定向视图!',
});
return;
}
const viewparam: any = <#if item.getOpenViewParam?? && item.getOpenViewParam()??>${item.getOpenViewParam()}<#else>{}</#if>; const viewparam: any = <#if item.getOpenViewParam?? && item.getOpenViewParam()??>${item.getOpenViewParam()}<#else>{}</#if>;
<#if dataview.getOpenMode() == 'INDEXVIEWTAB' || dataview.getOpenMode() == ''> <#if dataview.getOpenMode() == 'INDEXVIEWTAB' || dataview.getOpenMode() == ''>
const _params = this.$util.prepareRouteParmas({ const _params = this.$util.prepareRouteParmas({
...@@ -17,14 +23,7 @@ ...@@ -17,14 +23,7 @@
targetNode: '${dataview.getPSAppModule().getCodeName()?lower_case}_${dataview.getCodeName()?lower_case}', targetNode: '${dataview.getPSAppModule().getCodeName()?lower_case}_${dataview.getCodeName()?lower_case}',
data: Object.assign({}, viewparam), data: Object.assign({}, viewparam),
}); });
<#if dataview.getViewType() == 'DEREDIRECTVIEW'> this.$router.push({ name: '${dataview.getPSAppModule().getCodeName()?lower_case}_${dataview.getCodeName()?lower_case}', params: _params });
this.$Modal.error({
title: '首页菜单应用功能不支持打开重定向视图!',
});
return;
<#else>
this.$router.push({ name: '${dataview.getPSAppModule().getCodeName()?lower_case}_${dataview.getCodeName()?lower_case}', params: _params });
</#if>
</#if> </#if>
<#if dataview.getOpenMode() == 'POPUP'> <#if dataview.getOpenMode() == 'POPUP'>
console.log('-----POPUP-----非模式弹出,暂时不实现'); console.log('-----POPUP-----非模式弹出,暂时不实现');
...@@ -37,17 +36,10 @@ ...@@ -37,17 +36,10 @@
width: ${dataview.getWidth()?c}, width: ${dataview.getWidth()?c},
}; };
const data = { srfparentdata: viewparam }; const data = { srfparentdata: viewparam };
<#if dataview.getViewType() == 'DEREDIRECTVIEW'> const appmodal = this.$appmodal.openModal(view, data);
this.$Modal.error({ appmodal.subscribe((result: any) => {
title: '首页菜单应用功能不支持打开重定向视图!',
});
return;
<#else>
const appmodal = this.$appmodal.openModal(view, data);
appmodal.subscribe((result: any) => {
console.log(result); console.log(result);
}); });
</#if>
</#if> </#if>
<#if dataview.getOpenMode() == 'POPUPAPP'> <#if dataview.getOpenMode() == 'POPUPAPP'>
console.log('-----POPUPAPP-----独立程序弹出,暂时不实现'); console.log('-----POPUPAPP-----独立程序弹出,暂时不实现');
...@@ -61,17 +53,10 @@ ...@@ -61,17 +53,10 @@
placement: '${dataview.getOpenMode()}' placement: '${dataview.getOpenMode()}'
}; };
const data: any = { srfparentdata: viewparam }; const data: any = { srfparentdata: viewparam };
<#if dataview.getViewType() == 'DEREDIRECTVIEW'> const appdrawer = this.$appdrawer.openDrawer(view, data);
this.$Modal.error({ appdrawer.subscribe((result: any) => {
title: '首页菜单应用功能不支持打开重定向视图!',
});
return;
<#else>
const appdrawer = this.$appdrawer.openDrawer(view, data);
appdrawer.subscribe((result: any) => {
console.log(result); console.log(result);
}); });
</#if>
</#if> </#if>
<#if dataview.getOpenMode() == 'POPOVER'> <#if dataview.getOpenMode() == 'POPOVER'>
const view: any = { const view: any = {
...@@ -82,17 +67,10 @@ ...@@ -82,17 +67,10 @@
placement: '${dataview.getOpenMode()}' placement: '${dataview.getOpenMode()}'
}; };
const data: any = { srfparentdata: viewparam }; const data: any = { srfparentdata: viewparam };
<#if dataview.getViewType() == 'DEREDIRECTVIEW'> const appPopover = this.$apppopover.openPop($event, view, data);
this.$Modal.error({ appPopover.subscribe((result: any) => {
title: '首页菜单应用功能不支持打开重定向视图!',
});
return;
<#else>
const appPopover = this.$apppopover.openPop($event, view, data);
appPopover.subscribe((result: any) => {
console.log(result); console.log(result);
}); });
</#if>
</#if> </#if>
<#if dataview.getOpenMode()?index_of('USER') == 0> <#if dataview.getOpenMode()?index_of('USER') == 0>
console.log('-----${dataview.getOpenMode()}-----用户自定义'); console.log('-----${dataview.getOpenMode()}-----用户自定义');
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册