提交 89b9f66d 编写于 作者: zhangpingchuan's avatar zhangpingchuan

zpc---修复独立程序弹出未支持

上级 10548dda
...@@ -42,7 +42,19 @@ ...@@ -42,7 +42,19 @@
}); });
</#if> </#if>
<#if dataview.getOpenMode() == 'POPUPAPP'> <#if dataview.getOpenMode() == 'POPUPAPP'>
console.log('-----POPUPAPP-----独立程序弹出,暂时不实现'); const _params = this.$util.prepareRouteParmas({
route: this.$route,
sourceNode: this.$route.name,
targetNode: '${dataview.getPSAppModule().getCodeName()?lower_case}_${dataview.getCodeName()?lower_case}',
data: Object.assign({}, viewparam),
});
let targetViewPath:string = "";
if(Object.keys(_params).length > 0){
Object.keys(_params).forEach((item:string) =>{
<#noparse>targetViewPath += _params[item]?`/${item}/${_params[item]}`:`/${item}`;</#noparse>
})
}
window.open('./#'+targetViewPath, '_blank');
</#if> </#if>
<#if dataview.getOpenMode()?index_of('DRAWER') == 0> <#if dataview.getOpenMode()?index_of('DRAWER') == 0>
const view: any = { const view: any = {
......
...@@ -205,6 +205,24 @@ ...@@ -205,6 +205,24 @@
placement: '${dataview.getOpenMode()}', placement: '${dataview.getOpenMode()}',
}; };
openPopOver(view, data); openPopOver(view, data);
<#elseif dataview.getOpenMode() == 'POPUPAPP'>
<#-- 打开独立程序弹出 -->
const openPopupApp = (viewpath: string, data: any) => {
const _params = this.$util.prepareRouteParmas({
route: this.$route,
sourceNode: this.$route.name,
targetNode: viewpath,
data: data,
});
let targetViewPath:string = "";
if(Object.keys(_params).length > 0){
Object.keys(_params).forEach((item:string) =>{
<#noparse>targetViewPath += _params[item]?`/${item}/${_params[item]}`:`/${item}`;</#noparse>
})
}
window.open('./#'+targetViewPath, '_blank');
}
openPopupApp('${dataview.getPSAppModule().codeName?lower_case}_${dataview.codeName?lower_case}', data);
<#else> <#else>
this.$Notice.warning({ title: '错误', desc: '${dataview.title} 不支持该模式打开' }); this.$Notice.warning({ title: '错误', desc: '${dataview.title} 不支持该模式打开' });
</#if> </#if>
......
...@@ -71,11 +71,6 @@ ...@@ -71,11 +71,6 @@
xData.refresh(result.datas); xData.refresh(result.datas);
}); });
} }
<#-- 打开独立程序弹出 -->
// 打开独立程序弹出
const openPopupApp = (url: string) => {
window.open(url, '_blank');
}
<#assign dataview_de = dataview.getPSDataEntity()/> <#assign dataview_de = dataview.getPSDataEntity()/>
const url: string = '${app.getPKGCodeName()?lower_case}/${dataview_de.getPSSystemModule().codeName?lower_case}/${dataview_de.codeName?lower_case}/${dataview.getPSDEViewCodeName()?lower_case}/getmodel'; const url: string = '${app.getPKGCodeName()?lower_case}/${dataview_de.getPSSystemModule().codeName?lower_case}/${dataview_de.codeName?lower_case}/${dataview.getPSDEViewCodeName()?lower_case}/getmodel';
this.$http.get(url, data).then((response: any) => { this.$http.get(url, data).then((response: any) => {
...@@ -104,7 +99,7 @@ ...@@ -104,7 +99,7 @@
} }
if (Object.is(result.openmode, 'POPUPAPP') && result.url && !Object.is(result.url, '')) { if (Object.is(result.openmode, 'POPUPAPP') && result.url && !Object.is(result.url, '')) {
openPopupApp(result.url); window.open(result.url, '_blank');
} else if (Object.is(result.openmode, 'INDEXVIEWTAB') || Object.is(result.openmode, '')) { } else if (Object.is(result.openmode, 'INDEXVIEWTAB') || Object.is(result.openmode, '')) {
const viewpath = ${r'`${result.viewmodule}_${result.viewname}`.toLowerCase()'}; const viewpath = ${r'`${result.viewmodule}_${result.viewname}`.toLowerCase()'};
if(!data.srfkey){ if(!data.srfkey){
...@@ -254,6 +249,24 @@ ...@@ -254,6 +249,24 @@
placement: '${dataview.getOpenMode()}', placement: '${dataview.getOpenMode()}',
}; };
openPopOver(view, data); openPopOver(view, data);
<#elseif dataview.getOpenMode() == 'POPUPAPP'>
<#-- 打开独立程序弹出 -->
const openPopupApp = (viewpath: string, data: any) => {
const _params = this.$util.prepareRouteParmas({
route: this.$route,
sourceNode: this.$route.name,
targetNode: viewpath,
data: data,
});
let targetViewPath:string = "";
if(Object.keys(_params).length > 0){
Object.keys(_params).forEach((item:string) =>{
<#noparse>targetViewPath += _params[item]?`/${item}/${_params[item]}`:`/${item}`;</#noparse>
})
}
window.open('./#'+targetViewPath, '_blank');
}
openPopupApp('${dataview.getPSAppModule().codeName?lower_case}_${dataview.codeName?lower_case}', data);
<#else> <#else>
this.$Notice.warning({ title: '错误', desc: '${dataview.title} 不支持该模式打开' }); this.$Notice.warning({ title: '错误', desc: '${dataview.title} 不支持该模式打开' });
</#if> </#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册