提交 56c00738 编写于 作者: KK's avatar KK

搜索表单打开是返回操作异常

上级 3f7125ee
......@@ -72,7 +72,7 @@
<#-- 输出快速搜索:BEGIN -->
<#if view.isEnableQuickSearch?? && view.isEnableQuickSearch() == true>
<app-search-history @quickValueChange="quickValueChange" @openSearchform="()=>{this.searchformState=true;}" :model="model" :showfilter="${view.hasPSControl('searchform')?c}"></app-search-history>
<app-search-history @quickValueChange="quickValueChange" :model="model" :showfilter="${view.hasPSControl('searchform')?c}"></app-search-history>
</#if>
<#if view.isEnableQuickGroup?? && view.isEnableQuickGroup()?? && view.isEnableQuickGroup() == true>
......
......@@ -12,13 +12,26 @@
<#if view.hasPSControl('searchform')>
<#assign searchform = view.getPSControl('searchform')>
/**
* 搜索表单状态
*
* @type {boolean}
* @type {get}
* @memberof ${srfclassname('${view.name}')}Base
*/
get searchformState(){
return this.$store.state.searchformStatus;
}
/**
* 搜索表单状态
*
* @type {set}
* @memberof ${srfclassname('${view.name}')}Base
*/
public searchformState: boolean = false;
set searchformState(val:any){
this.$store.commit('setSearchformStatus',val);
}
/**
* 是否展开搜索表单
......@@ -34,7 +47,7 @@
* @memberof ${srfclassname('${view.name}')}Base
*/
public onSearch(): void {
this.searchformState = false;
this.$store.commit('setSearchformStatus',false);
this.isExpandSearchForm = true;
const form: any = this.$refs.${searchform.name};
if (form) {
......@@ -49,7 +62,7 @@
* @memberof ${srfclassname('${view.name}')}Base
*/
public onReset(): void {
this.searchformState = false;
this.$store.commit('setSearchformStatus',false);
this.isExpandSearchForm = false;
const form: any = this.$refs.${searchform.name};
if (form) {
......
......@@ -265,6 +265,10 @@ ${P.getLogicCode(logic, "LOGIC.vue").code}
* @memberof ${srfclassname('${view.name}')}Base
*/
protected async closeView(args: any[]): Promise<any> {
if(this.$store.state.searchformStatus){
this.$store.commit('setSearchformStatus',false);
return
}
<#if userCloseView??>
${userCloseView}
<#else>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册