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

update:更新

上级 3cc12e30
......@@ -26,11 +26,13 @@ ${front_block}
${item.render.code}
<#else>
<#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>
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()??>
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>
<#else>
<#-- BEGIN: 数据目标: 单项数据 -->
......
......@@ -25,11 +25,13 @@ ${backend_block}
${item.render.code}
<#else>
<#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>
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()??>
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>
<#else>
<#-- BEGIN: 自定义确认 -->
......
......@@ -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 @@
<#if logic.getLogicType() == 'DEUILOGIC' && logic.getPSAppDEUILogic?? && logic.getPSAppDEUILogic()??>
<#assign hasLogic = true>
<#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) {
return;
}
......@@ -438,7 +475,7 @@
});
<#else>
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) {
return;
}
......@@ -479,7 +516,7 @@
<#if logic.getLogicType() == 'DEUILOGIC' && logic.getPSAppDEUILogic?? && logic.getPSAppDEUILogic()??>
<#assign hasLogic = true>
<#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) {
return;
}
......@@ -489,7 +526,7 @@
});
<#else>
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) {
return;
}
......@@ -648,7 +685,7 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code}
<#if logic.getLogicType() == 'DEUILOGIC' && logic.getPSAppDEUILogic?? && logic.getPSAppDEUILogic()??>
<#assign hasLogic = true>
<#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) {
return;
}
......@@ -658,7 +695,7 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code}
});
<#else>
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) {
return;
}
......
......@@ -262,17 +262,7 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
* @readonly
* @memberof ${srfclassname('${view.name}')}Base
*/
get viewCtx() {
return {
appGlobal: this.$store.getters.getAppGlobal(),
viewGlobal: {},
viewNavData: {},
viewNavContext: this.context,
viewNavParam: this.viewparams,
messageBox: this.$msgbox,
view: this,
}
}
public viewCtx: any = {};
<#if view.getXDataPSControl?? && view.getXDataPSControl()??>
<#assign dataControl = view.getXDataPSControl()/>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册