提交 a42ef307 编写于 作者: JunZai's avatar JunZai

update

上级 ccba82d8
......@@ -6,31 +6,33 @@
</#if>
<div class="search-bar-action">
<i-button title="搜索" @click="onSearch"><i class="fa fa-search" aria-hidden="true"></i></i-button>
<i-button title="添加" v-if="filterFields.length > 0" @click="onAdd"><i class="fa fa-plus" aria-hidden="true"></i></i-button>
<i-button title="保存" @click="onSave"><i class="fa fa-floppy-o" aria-hidden="true"></i></i-button>
<i-button title="重置" @click="onReset"><i class="fa fa-repeat" aria-hidden="true"></i></i-button>
</div>
</div>
<div v-if="filterFields.length > 0" class="filter-group">
<template v-for="(item, index) of filterItems">
<filter-item :key="index" :data="item" :filterFields="filterFields" @remove="onRemove(index)">
<template slot-scope="{ data }">
<template v-if="!data.field">
<i-input></i-input>
</template>
<#if ctrl.getPSSearchBarFilters()??>
<#list ctrl.getPSSearchBarFilters() as filter>
<template v-if="Object.is(data.field, '${filter.getName()}')">
${P.getEditorCode(filter, "EDITOR.vue").code}
</template>
</#list>
</#if>
<filter-tree :datas="filterItems" :fields="filterFields">
<template slot-scope="{ data }">
<#if ctrl.getPSSearchBarFilters()??>
<#list ctrl.getPSSearchBarFilters() as filter>
<template v-if="Object.is(data.field, '${filter.getName()}')">
${P.getEditorCode(filter, "EDITOR.vue").code}
</template>
</filter-item>
</template>
</#list>
</#if>
</template>
</filter-tree>
</div>
</div>
</template>
<#assign import_block>
import FilterTree from '@components/filter-tree/filter-tree.vue';
</#assign>
<#assign component_block>
FilterTree,
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
......@@ -63,7 +65,7 @@
<#if ctrl.getPSSearchBarFilters()??>
<#list ctrl.getPSSearchBarFilters() as filter>
'${filter.getName()}': {
label: '${filter.getCaption()}',
label: '<#if filter.getPSDEField()??>${filter.getPSDEField().getLogicName()}</#if>',
name: '${filter.getName()}',
prop: '<#if filter.getPSDEField()??>${filter.getPSDEField().getCodeName()?lower_case}<#else>${filter.getName()}</#if>',
disabled: false
......@@ -127,16 +129,6 @@
this.filterItems.splice(index, 1);
}
/**
* 添加过滤项
*
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onAdd() {
this.filterItems.push({ group: '1' });
}
/**
* 搜索
*
......@@ -154,7 +146,7 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onSave() {
console.log(this.filterItems)
}
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册