提交 b2c30fa9 编写于 作者: Mosher's avatar Mosher

update:更新

上级 3cc12e30
...@@ -26,11 +26,13 @@ ${front_block} ...@@ -26,11 +26,13 @@ ${front_block}
${item.render.code} ${item.render.code}
<#else> <#else>
<#if item.getUILogicAttachMode?? && item.getUILogicAttachMode()?? && item.getUILogicAttachMode() == 'REPLACE' && item.getPSAppDEUILogic?? && item.getPSAppDEUILogic()??> <#if item.getUILogicAttachMode?? && item.getUILogicAttachMode()?? && item.getUILogicAttachMode() == 'REPLACE' && item.getPSAppDEUILogic?? && item.getPSAppDEUILogic()??>
const _context: any = Object.assign(context, actionContext.context);
const _params: any = Object.assign(params, actionContext.viewparams);
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()?? && item.getPSAppDataEntity().codeName == item.getPSAppDEUILogic().getPSAppDataEntity().codeName> <#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()?? && item.getPSAppDataEntity().codeName == item.getPSAppDEUILogic().getPSAppDataEntity().codeName>
return this.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, context, params, $event, xData, actionContext, srfParentDeName); return this.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, _context, _params, $event, xData, actionContext, srfParentDeName);
<#elseif item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()??> <#elseif item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()??>
const uiService = await window.uiServiceRegister.getService('${item.getPSAppDEUILogic().getPSAppDataEntity().codeName}'); const uiService = await window.uiServiceRegister.getService('${item.getPSAppDEUILogic().getPSAppDataEntity().codeName}');
return uiService.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, context, params, $event, xData, actionContext, srfParentDeName); return uiService.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, _context, _params, $event, xData, actionContext, srfParentDeName);
</#if> </#if>
<#else> <#else>
<#-- BEGIN: 数据目标: 单项数据 --> <#-- BEGIN: 数据目标: 单项数据 -->
......
...@@ -25,11 +25,13 @@ ${backend_block} ...@@ -25,11 +25,13 @@ ${backend_block}
${item.render.code} ${item.render.code}
<#else> <#else>
<#if item.getUILogicAttachMode?? && item.getUILogicAttachMode()?? && item.getUILogicAttachMode() == 'REPLACE' && item.getPSAppDEUILogic?? && item.getPSAppDEUILogic()??> <#if item.getUILogicAttachMode?? && item.getUILogicAttachMode()?? && item.getUILogicAttachMode() == 'REPLACE' && item.getPSAppDEUILogic?? && item.getPSAppDEUILogic()??>
const _context: any = Object.assign(context, actionContext.context);
const _params: any = Object.assign(params, actionContext.viewparams);
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()?? && item.getPSAppDataEntity().codeName == item.getPSAppDEUILogic().getPSAppDataEntity().codeName> <#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()?? && item.getPSAppDataEntity().codeName == item.getPSAppDEUILogic().getPSAppDataEntity().codeName>
return this.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, context, params, $event, xData, actionContext, srfParentDeName); return this.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, _context, _params, $event, xData, actionContext, srfParentDeName);
<#elseif item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()??> <#elseif item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()??>
const uiService = await window.uiServiceRegister.getService('${item.getPSAppDEUILogic().getPSAppDataEntity().codeName}'); const uiService = await window.uiServiceRegister.getService('${item.getPSAppDEUILogic().getPSAppDataEntity().codeName}');
return uiService.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, context, params, $event, xData, actionContext, srfParentDeName); return uiService.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, _context, _params, $event, xData, actionContext, srfParentDeName);
</#if> </#if>
<#else> <#else>
<#-- BEGIN: 自定义确认 --> <#-- BEGIN: 自定义确认 -->
......
...@@ -367,7 +367,44 @@ ...@@ -367,7 +367,44 @@
} }
}) })
} }
<#if created_block??>${created_block}</#if> _this.initViewCtx();
<#if created_block??>
${created_block}
</#if>
}
/**
* 初始化视图操作参数
*
* @memberof ${srfclassname('${view.name}')}Base
*/
initViewCtx() {
Object.assign(this.viewCtx, {
app: this.$router,
view: this,
viewGlobal: {},
viewNavData: {},
viewNavContext: this.context,
viewNavParam: this.viewparams,
messagebox: AppMessageBox.getInstance(),
});
Object.assign(this.viewCtx, { appGlobal: this.$store.getters.getAppGlobal() });
if (this.$store.getters.getRouteViewGlobal(this.context.srfsessionid)) {
Object.assign(this.viewCtx, { routeViewGlobal: this.$store.getters.getRouteViewGlobal(this.context.srfsessionid) });
} else {
this.$store.commit('addRouteViewGlobal', { tag: this.context.srfsessionid, param: {} });
Object.assign(this.viewCtx, { routeViewGlobal: this.$store.getters.getRouteViewGlobal(this.context.srfsessionid) });
}
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
// 嵌入视图
Object.assign(this.viewCtx, {
topview: this.$store.getters.getView(this.context.srfsessionid)
});
} else {
// 顶层视图
this.$store.commit('addView', { tag: this.context.srfsessionid, param: this });
Object.assign(this.viewCtx, { topview: this });
}
} }
/** /**
...@@ -428,7 +465,7 @@ ...@@ -428,7 +465,7 @@
<#if logic.getLogicType() == 'DEUILOGIC' && logic.getPSAppDEUILogic?? && logic.getPSAppDEUILogic()??> <#if logic.getLogicType() == 'DEUILOGIC' && logic.getPSAppDEUILogic?? && logic.getPSAppDEUILogic()??>
<#assign hasLogic = true> <#assign hasLogic = true>
<#if view.getPSAppDataEntity?? && view.getPSAppDataEntity()?? && view.getPSAppDataEntity().codeName == logic.getPSAppDEUILogic().getPSAppDataEntity().codeName> <#if view.getPSAppDataEntity?? && view.getPSAppDataEntity()?? && view.getPSAppDataEntity().codeName == logic.getPSAppDEUILogic().getPSAppDataEntity().codeName>
this.appUIService.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], Util.deepCopy(this.context), Util.deepCopy(this.viewparams), {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => { this.appUIService.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], this.context, this.viewparams, {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => {
if (result && result.hasOwnProperty('srfret') && !result.srfret) { if (result && result.hasOwnProperty('srfret') && !result.srfret) {
return; return;
} }
...@@ -438,7 +475,7 @@ ...@@ -438,7 +475,7 @@
}); });
<#else> <#else>
window.uiServiceRegister.getService('${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((service: any) => { window.uiServiceRegister.getService('${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((service: any) => {
service.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], Util.deepCopy(this.context), Util.deepCopy(this.viewparams), {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => { service.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], this.context, this.viewparams, {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => {
if (result && result.hasOwnProperty('srfret') && !result.srfret) { if (result && result.hasOwnProperty('srfret') && !result.srfret) {
return; return;
} }
...@@ -479,7 +516,7 @@ ...@@ -479,7 +516,7 @@
<#if logic.getLogicType() == 'DEUILOGIC' && logic.getPSAppDEUILogic?? && logic.getPSAppDEUILogic()??> <#if logic.getLogicType() == 'DEUILOGIC' && logic.getPSAppDEUILogic?? && logic.getPSAppDEUILogic()??>
<#assign hasLogic = true> <#assign hasLogic = true>
<#if view.getPSAppDataEntity?? && view.getPSAppDataEntity()?? && view.getPSAppDataEntity().codeName == logic.getPSAppDEUILogic().getPSAppDataEntity().codeName> <#if view.getPSAppDataEntity?? && view.getPSAppDataEntity()?? && view.getPSAppDataEntity().codeName == logic.getPSAppDEUILogic().getPSAppDataEntity().codeName>
this.appUIService.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], Util.deepCopy(this.context), Util.deepCopy(this.viewparams), {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => { this.appUIService.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], this.context, this.viewparams, {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => {
if (result && result.hasOwnProperty('srfret') && !result.srfret) { if (result && result.hasOwnProperty('srfret') && !result.srfret) {
return; return;
} }
...@@ -489,7 +526,7 @@ ...@@ -489,7 +526,7 @@
}); });
<#else> <#else>
window.uiServiceRegister.getService('${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((service: any) => { window.uiServiceRegister.getService('${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((service: any) => {
service.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], Util.deepCopy(this.context), Util.deepCopy(this.viewparams), {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => { service.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], this.context, this.viewparams, {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => {
if (result && result.hasOwnProperty('srfret') && !result.srfret) { if (result && result.hasOwnProperty('srfret') && !result.srfret) {
return; return;
} }
...@@ -648,7 +685,7 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code} ...@@ -648,7 +685,7 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code}
<#if logic.getLogicType() == 'DEUILOGIC' && logic.getPSAppDEUILogic?? && logic.getPSAppDEUILogic()??> <#if logic.getLogicType() == 'DEUILOGIC' && logic.getPSAppDEUILogic?? && logic.getPSAppDEUILogic()??>
<#assign hasLogic = true> <#assign hasLogic = true>
<#if view.getPSAppDataEntity?? && view.getPSAppDataEntity()?? && view.getPSAppDataEntity().codeName == logic.getPSAppDEUILogic().getPSAppDataEntity().codeName> <#if view.getPSAppDataEntity?? && view.getPSAppDataEntity()?? && view.getPSAppDataEntity().codeName == logic.getPSAppDEUILogic().getPSAppDataEntity().codeName>
this.appUIService.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], Util.deepCopy(this.context), Util.deepCopy(this.viewparams), {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => { this.appUIService.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], this.context, this.viewparams, {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => {
if (result && result.hasOwnProperty('srfret') && !result.srfret) { if (result && result.hasOwnProperty('srfret') && !result.srfret) {
return; return;
} }
...@@ -658,7 +695,7 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code} ...@@ -658,7 +695,7 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code}
}); });
<#else> <#else>
window.uiServiceRegister.getService('${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((service: any) => { window.uiServiceRegister.getService('${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((service: any) => {
service.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], Util.deepCopy(this.context), Util.deepCopy(this.viewparams), {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => { service.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], this.context, this.viewparams, {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => {
if (result && result.hasOwnProperty('srfret') && !result.srfret) { if (result && result.hasOwnProperty('srfret') && !result.srfret) {
return; return;
} }
......
...@@ -262,17 +262,7 @@ export default class ${srfclassname('${view.name}')}Base extends Vue { ...@@ -262,17 +262,7 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
* @readonly * @readonly
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
get viewCtx() { public viewCtx: any = {};
return {
appGlobal: this.$store.getters.getAppGlobal(),
viewGlobal: {},
viewNavData: {},
viewNavContext: this.context,
viewNavParam: this.viewparams,
messageBox: this.$msgbox,
view: this,
}
}
<#if view.getXDataPSControl?? && view.getXDataPSControl()??> <#if view.getXDataPSControl?? && view.getXDataPSControl()??>
<#assign dataControl = view.getXDataPSControl()/> <#assign dataControl = view.getXDataPSControl()/>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册