提交 befe0551 编写于 作者: KK's avatar KK

向导添加

上级 08bf8624
...@@ -18,7 +18,35 @@ ...@@ -18,7 +18,35 @@
*/ */
public async ${item.name}(args: any[], contextJO: any = {}, paramJO: any = {}, $event?: any, xData?: any, container?: any, srfParentDeName?: string): Promise<any> { public async ${item.name}(args: any[], contextJO: any = {}, paramJO: any = {}, $event?: any, xData?: any, container?: any, srfParentDeName?: string): Promise<any> {
<#if viewlogic.isEnableWizardAdd()> <#if viewlogic.isEnableWizardAdd()>
this.$notice.warning('向导添加未实现'); <#if viewlogic.getWizardPSAppView?? && viewlogic.getWizardPSAppView()??>
<#assign wizardAppView = viewlogic.getWizardPSAppView() />
let wizardAppView:any = {viewname:'${srffilepath2(wizardAppView.getCodeName())}',height: ${wizardAppView.getHeight()?c},width: ${wizardAppView.getWidth()?c},title: '${wizardAppView.title}'};
let container: Subject<any> = this.globaluiservice.openService.openModal(wizardAppView, JSON.parse(JSON.stringify(this.context)), args[0]);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if(result && result.datas && result.datas.length >0 ){
let targetkey:string = result.datas[0].srfkey;
<#if viewlogic.getNewDataPSAppViews?? && viewlogic.getNewDataPSAppViews()??>
let newDataAppViews:any ={
<#list viewlogic.getNewDataPSAppViews() as newDataAppView>
<#compress>${newDataAppView.getRefMode()}:<#if newDataAppView.isPSDEView()><#assign appDataEntity = newDataAppView.getPSAppDataEntity() />[{ pathName: '${srfpluralize(appDataEntity.codeName)?lower_case}', parameterName: '${appDataEntity.getCodeName()?lower_case}' },{ pathName: '${newDataAppView.getPSDEViewCodeName()?lower_case}', parameterName: '${newDataAppView.getPSDEViewCodeName()?lower_case}' }]<#else>[]</#if><#if newDataAppView_has_next>,</#if></#compress>
</#list>
};
</#if>
const data: any = {};
if(args[0].srfsourcekey) data.srfsourcekey = args[0].srfsourcekey;
let tempContext = JSON.parse(JSON.stringify(this.context));
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, [], newDataAppViews[targetkey], args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
})
<#elseif viewlogic.isEnableBatchAdd()> <#elseif viewlogic.isEnableBatchAdd()>
this.$notice.warning('支持批添加未实现'); this.$notice.warning('支持批添加未实现');
<#elseif viewlogic.isBatchAddOnly()> <#elseif viewlogic.isBatchAddOnly()>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册