提交 daca1985 编写于 作者: RedPing97's avatar RedPing97

优化实体html视图

上级 4c3d6347
<#ibizinclude> <#ibizinclude>
../@MACRO/DEFAULT.less.ftl ../@MACRO/DEFAULT.less.ftl
</#ibizinclude> </#ibizinclude>
\ No newline at end of file .iframe-container{
height: 100%;
iframe{
height: 100%;
width: 100%;
border-width: 0px;
}
}
.app-error-view {
height: 100%;
width: 100%;
.app-error-container {
height: 380px;
width: 670px;
position: absolute;
top: calc((100% - 400px) / 2);
left: calc((100% - 670px) / 2);
display: flex;
align-items: center;
.error-text {
padding-left: 20px;
.error-text1 {
font-size: 20px;
margin-bottom: 20px;
}
.error-text2 {
font-size: 14px;
}
}
}
}
\ No newline at end of file
<div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :disHover="true" :padding="0" :bordered="false">
<#ibizinclude>
../VIEW_CAPTION.vue.ftl
</#ibizinclude>
<#if view.hasPSControl('toolbar')>
<#assign toolbarCtrl = view.getPSControl('toolbar')>
<@ibizindent blank=8>
${P.getCtrlCode(toolbarCtrl, 'CONTROL.html').code}
</@ibizindent>
</#if>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=12>
<#ibizinclude> <#ibizinclude>
../@MACRO/DEFAULT.vue.ftl ../View_Pos_Top_Msgs.vue.ftl
</#ibizinclude> </#ibizinclude>
\ No newline at end of file </@ibizindent>
<#-- END:视图顶部视图消息 -->
<div class="content-container">
<#-- BEGIN:视图内容区视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Body_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图内容区视图消息 -->
<#if view.getAllPSControls()??>
<#list view.getAllPSControls() as ctrl>
<#if ctrl.getControlType() != "TOOLBAR">
<#if P.getCtrlCode(ctrl, 'CONTROL.html')??>
<@ibizindent blank=12>
${P.getCtrlCode(ctrl, 'CONTROL.html').code}
</@ibizindent>
</#if>
</#if>
</#list>
</#if>
<div v-if="iframeUrl.length > 0" class="iframe-container">
<iframe :src="iframeUrl"></iframe>
</div>
<div v-else >
<div class="app-error-view">
<div class="app-error-container">
<img src="/assets/img/404.png" />
<div class="error-text">
<div class="error-text1">{{$t('components.404.errorText1')}}</div>
<div class="error-text2">{{$t('components.404.errorText2')}}</div>
</div>
</div>
</div>
</div>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=12>
<#ibizinclude>
../View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</card>
</div>
\ No newline at end of file
...@@ -190,6 +190,9 @@ ...@@ -190,6 +190,9 @@
this.handleCustomViewData(); this.handleCustomViewData();
//初始化导航数据 //初始化导航数据
this.initNavDataWithRoute(); this.initNavDataWithRoute();
<#if self_viewparam??>
${self_viewparam}
</#if>
} }
/** /**
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
<#assign self_content = ''/> <#assign self_content = ''/>
<#if view.getHtmlUrl()??> <#if view.getHtmlUrl()??>
<#assign self_viewparam>
this.parseIframeSrc(this.context,this.viewparams);
</#assign>
<#assign self_content> <#assign self_content>
/** /**
* 嵌入视图路径 * 嵌入视图路径
...@@ -17,6 +20,21 @@ ...@@ -17,6 +20,21 @@
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public iframeUrl: string = '${view.getHtmlUrl()}'; public iframeUrl: string = '${view.getHtmlUrl()}';
/**
* 嵌入视图路径
*
* @public
* @type string
* @memberof HomeHtmlViewBase
*/
public iframeUrl: string = '';
public parseIframeSrc(context: any,viewparams: any){
this.iframeUrl = `${view.getHtmlUrl()}`;
if(this.iframeUrl.includes("undefine")) {
this.iframeUrl = '';
}
}
</#assign> </#assign>
</#if> </#if>
<#ibizinclude> <#ibizinclude>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册