提交 74c7bc34 编写于 作者: zhujiamin's avatar zhujiamin

选择视图新增保存返回按钮 --fix1

上级 6cc1d84a
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.option-view-btnbox{
width: 90%;
margin:0 auto;
display: flex;
justify-content: space-between;
margin-bottom: 10px;
.option-btn{
width: 45%;
}
}
\ No newline at end of file
<#if view.hasPSControl('form')>
<#assign view_content>
<div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<div class='view-card <#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' dis-hover :padding="0" :bordered="false">
<div class="content-container">
<#if view.hasPSControl('form')>
<@ibizindent blank=12>
${P.getCtrlCode('form', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
</div>
</div>
${P.getCtrlCode('form', 'CONTROL.html').code}
</#assign>
</#if>
<#assign view_footer>
<div class="option-view-btnbox">
<ion-button class="option-btn medium" color="medium" @click="back">返回</ion-button>
<ion-button class="option-btn success" @click="save">保存</ion-button>
</div>
</#assign>
<#ibizinclude>
......
......@@ -10,6 +10,40 @@
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
/**
* 保存按钮事件
*
* @protected
* @memberof MOBTESTMobOptionViewBase
*/
protected save() {
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
this.viewState.next({ tag: 'form', action: 'saveandexit', data: datas });
}
/**
* 返回按钮事件
*
* @protected
* @memberof MOBTESTMobOptionViewBase
*/
protected back(args: any[]) {
if (this.viewDefaultUsage === "routerView" ) {
this.$store.commit("deletePage", this.$route.fullPath);
this.$router.go(-1);
} else {
this.$emit("close", { status: "success", action: "close", data: args instanceof MouseEvent ? null : args });
}
}
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册