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

update:更新

上级 35c0385c
<#assign import_block> <#assign import_block>
import UIService from '@/uiservice/ui-service'; import UIService from '@/uiservice/ui-service';
import qs from 'qs'; import qs from 'qs';
import entityMapping from '@/config/entity-mapping';
</#assign> </#assign>
<#assign created_block> <#assign created_block>
this.viewInit(); this.viewInit();
...@@ -22,7 +23,8 @@ import qs from 'qs'; ...@@ -22,7 +23,8 @@ import qs from 'qs';
public async viewInit(){ public async viewInit(){
let { srfappkey, srfappde, userTaskId } = this.viewparams; let { srfappkey, srfappde, userTaskId } = this.viewparams;
const uiService: UIService = new UIService(); const uiService: UIService = new UIService();
const targetService: any = await uiService.getService(srfappde.toLowerCase()); const entityCodeName = entityMapping[srfappde.toLowerCase()];
const targetService: any = await uiService.getService(entityCodeName);
targetService.getRDAppView(srfappkey, this.isEnableWorkflow).then((res: any) => { targetService.getRDAppView(srfappkey, this.isEnableWorkflow).then((res: any) => {
if (res && res.viewname && res.srfappde) { if (res && res.viewname && res.srfappde) {
const indexPath = this.$viewTool.getIndexRoutePath(this.$route); const indexPath = this.$viewTool.getIndexRoutePath(this.$route);
......
<#ibiztemplate> <#ibiztemplate>
TARGET=PSSYSAPP TARGET=PSSYSAPP
</#ibiztemplate> </#ibiztemplate>
export default entityMapping ={ const entityMapping: any = {
<#if app.getAllPSAppDataEntities?? && app.getAllPSAppDataEntities()??> <#if app.getAllPSAppDataEntities?? && app.getAllPSAppDataEntities()??>
<#list app.getAllPSAppDataEntities() as appDataEntity> <#list app.getAllPSAppDataEntities() as appDataEntity>
'${srfpluralize(appDataEntity.codeName)?lower_case}':'${appDataEntity.getCodeName()?lower_case}'<#if appDataEntity_has_next>,</#if> '${srfpluralize(appDataEntity.codeName)?lower_case}':'${appDataEntity.getCodeName()?lower_case}'<#if appDataEntity_has_next>,</#if>
</#list> </#list>
</#if> </#if>
} }
\ No newline at end of file export default entityMapping;
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册