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

调整界面行为导航参数

上级 0fee066c
......@@ -37,6 +37,9 @@ ${front_block}
<#else>
<#-- BEGIN: 数据处理逻辑 -->
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
<#if item.getPSNavigateContexts?? && item.getPSNavigateContexts()??>
Object.assign(context,<@getNavigateContext item />);
</#if>
......@@ -50,7 +53,6 @@ ${front_block}
</#if>
<#-- 是否先保存目标数据end -->
const _args: any[] = Util.deepCopy(args);
const _this: any = actionContext;
const actionTarget: string | null = <#if item.getActionTarget()??>'${item.getActionTarget()}'<#else>null</#if>;
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()??>
<#assign appDataEntity = item.getPSAppDataEntity() />
......@@ -63,8 +65,14 @@ ${front_block}
Object.assign(params, { ${textItem}: '%${textItem}%' });
</#if>
</#if>
context = UIActionTool.handleContextParam(actionTarget,_args,context);
data = UIActionTool.handleActionParam(actionTarget,_args,params);
if(_this.context){
parentContext = _this.context;
}
if(_this.viewparams){
parentViewParam = _this.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
context = Object.assign({},actionContext.context,context);
<#-- 构建srfparentdename和srfparentkey start -->
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
......
......@@ -20,7 +20,7 @@ ${backend_block}
* @memberof ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}UIService
</#if>
*/
public async ${item.getFullCodeName()}(args: any[],context:any = {}, params?: any, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
public async ${item.getFullCodeName()}(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
<#if item.render??>
${item.render.code}
<#else>
......@@ -45,6 +45,15 @@ ${backend_block}
actionContext.$Notice.error({ title: '错误', desc: '不支持多项数据' });
<#else>
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
<#if item.getPSNavigateContexts?? && item.getPSNavigateContexts()??>
Object.assign(context,<@getNavigateContext item />);
</#if>
<#if item.getPSNavigateParams?? && item.getPSNavigateParams()??>
Object.assign(params,<@getNavigateParams item />);
</#if>
<#-- 是否先保存目标数据start -->
<#if item.isSaveTargetFirst()>
const result:any = await xData.save(args,false);
......@@ -52,7 +61,6 @@ ${backend_block}
</#if>
<#-- 是否先保存目标数据end -->
const _args: any[] = Util.deepCopy(args);
const _this: any = actionContext;
const actionTarget: string | null = <#if item.getActionTarget()??>'${item.getActionTarget()}'<#else>null</#if>;
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()??>
<#assign appDataEntity = item.getPSAppDataEntity() />
......@@ -65,8 +73,14 @@ ${backend_block}
Object.assign(params, { ${textItem}: '%${textItem}%' });
</#if>
</#if>
context = UIActionTool.handleContextParam(actionTarget,_args,context);
data = UIActionTool.handleActionParam(actionTarget,_args,params);
if(_this.context){
parentContext = _this.context;
}
if(_this.viewparams){
parentViewParam = _this.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
context = Object.assign({},actionContext.context,context);
<#-- 构建srfparentdename和srfparentkey start -->
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
......
......@@ -18,7 +18,7 @@
* @memberof ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}UIService<#t>
</#if>
*/
public async ${item.getFullCodeName()}(args: any[],context: any ={}, params?: any, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
public async ${item.getFullCodeName()}(args: any[],context: any ={}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
<#if item.render??>
${item.render.code}
<#else>
......@@ -26,17 +26,31 @@
<#if item.getFrontPSAppView()??>
<#assign dataview = item.getFrontPSAppView()>
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
<#if item.getPSNavigateContexts?? && item.getPSNavigateContexts()??>
Object.assign(context,<@getNavigateContext item />);
</#if>
<#if item.getPSNavigateParams?? && item.getPSNavigateParams()??>
Object.assign(params,<@getNavigateParams item />);
</#if>
<#-- 是否先保存目标数据start -->
<#if item.isSaveTargetFirst()>
const result:any = await xData.save(args,false);
args = [result.data];
</#if>
<#-- 是否先保存目标数据end -->
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = <#if item.getActionTarget()??>'${item.getActionTarget()}'<#else>null</#if>;
context = UIActionTool.handleContextParam(actionTarget,_args,context);
data = UIActionTool.handleActionParam(actionTarget,_args,params);
if(_this.context){
parentContext = _this.context;
}
if(_this.viewparams){
parentViewParam = _this.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
//转化表单界面数据
const resultData:any = xData.service.handleRequestData('',actionContext.context,_args[0]);
Object.assign(context,resultData.context,context);
......
......@@ -18,7 +18,7 @@
* @memberof ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}UIService<#t>
</#if>
*/
public async ${item.getFullCodeName()}(args: any[],context: any = {}, params?: any, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string) {
public async ${item.getFullCodeName()}(args: any[],context: any = {},params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string) {
<#if item.render??>
${item.render.code}
<#else>
......@@ -29,6 +29,9 @@
actionContext.$Notice.error({ title: '错误', desc: '不支持多项数据' });
<#else>
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
if(!args || args.length <1){
console.error("错误,无数据传入");
}
......@@ -40,7 +43,6 @@
</#if>
<#-- 是否先保存目标数据end -->
const _args: any[] = Util.deepCopy(args);
const _this: any = actionContext;
const actionTarget: string | null = <#if item.getActionTarget()??>'${item.getActionTarget()}'<#else>null</#if>;
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()??>
<#assign appDataEntity = item.getPSAppDataEntity() />
......@@ -59,8 +61,14 @@
</#if>
</#if>
</#if>
context = UIActionTool.handleContextParam(actionTarget,_args,context);
data = UIActionTool.handleActionParam(actionTarget,_args,params);
if(_this.context){
parentContext = _this.context;
}
if(_this.viewparams){
parentViewParam = _this.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
//转化表单界面数据
const resultData:any = xData.service.handleRequestData('',actionContext.context,_args[0]);
Object.assign(context,resultData.context,context);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册