提交 a051b91e 编写于 作者: zhangkang's avatar zhangkang

update:更新界面行为

上级 df1f1099
package cn.ibizlab.codegen.model; package cn.ibizlab.codegen.model;
import cn.ibizlab.codegen.utils.Inflector; import cn.ibizlab.codegen.utils.Inflector;
import cn.ibizlab.codegen.utils.StringAdvUtils;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.Getter; import lombok.Getter;
...@@ -69,6 +68,21 @@ public class AppEntityModel extends BaseModel{ ...@@ -69,6 +68,21 @@ public class AppEntityModel extends BaseModel{
appEntityResources.add(appEntityResource); appEntityResources.add(appEntityResource);
} }
// 初始化界面行为
if(getAppDataEntity().getAllPSAppDEUIActions() != null){
getAppDataEntity().getAllPSAppDEUIActions().forEach(appDEUIAction ->{
JSONObject actionJson = new JSONObject();
actionJson.put("codeName",appDEUIAction.getCodeName());
actionJson.put("uIActionTag",appDEUIAction.getUIActionTag());
actionJson.put("UIActionMode",appDEUIAction.getUIActionMode());
actionJson.put("actionTarget",appDEUIAction.getActionTarget());
actionJson.put("caption",appDEUIAction.getCaption());
if(appDEUIAction.getFrontPSAppView() != null){
actionJson.put("frontPSAppView", appDEUIAction.getFrontPSAppView().getCodeName());
}
appDEUIActions.add(actionJson);
});
}
} }
public IPSAppDataEntity getAppDataEntity() public IPSAppDataEntity getAppDataEntity()
...@@ -115,5 +129,9 @@ public class AppEntityModel extends BaseModel{ ...@@ -115,5 +129,9 @@ public class AppEntityModel extends BaseModel{
*/ */
private List<JSONObject> appEntityResources =new ArrayList<>(); private List<JSONObject> appEntityResources =new ArrayList<>();
/**
* 实体界面行为集合
*/
public List<JSONObject> appDEUIActions = new ArrayList<>();
} }
import { Http, UIServiceBase } from '@ibiz-core'; import { AppUIAction, IUIAction, UIServiceBase } from '@ibiz-core';
/** /**
* {{appEntity.logicName}}UI服务对象基类 * {{appEntity.logicName}}UI服务对象基类
...@@ -19,13 +19,27 @@ export class {{pascalCase appEntity.codeName}}UIServiceBase extends UIServiceBas ...@@ -19,13 +19,27 @@ export class {{pascalCase appEntity.codeName}}UIServiceBase extends UIServiceBas
super(opts); super(opts);
} }
/**
* 初始化界面行为数据 {{!-- 遍历界面行为 --}}
*
* @memberof {{pascalCase appEntity.codeName}}UIServiceBase {{~#each appEntity.appDEUIActions as | appDEUIAction | ~}}
*/ /**
protected async initActionMap(): Promise<void> { * {{appDEUIAction.caption}}
// TODO 初始化界面行为需要的配置参数 *
} * @param {*} params
* @memberof {{pascalCase appEntity.codeName}}UIServiceBase
*/
public async {{appDEUIAction.codeName}}(params:any){
const actionModel = {
codeName:'{{appDEUIAction.codeName}}',
uIActionMode:'{{upperCase appDEUIAction.UIActionMode}}',
actionTarget:'{{upperCase appDEUIAction.actionTarget}}',
uIActionTag:'{{upperCase appDEUIAction.uIActionTag}}',
frontPSAppView:'{{appDEUIAction.frontPSAppView}}'
};
AppUIAction.execute(actionModel, params);
}
{{/each}}
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册