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

update

上级 693adbee
......@@ -3,6 +3,21 @@
<#if ctrl.getQuickSearchMode() gt 0>
<i-input v-model="query" @on-change="onQueryChange" placeholder="<#if ctrl.getPSSearchBarQuickSearchs()??><#list ctrl.getPSSearchBarQuickSearchs() as search><#if search_index gt 0>,</#if><#if search.getPSDEField()??>${search.getPSDEField().getLogicName()}</#if></#list></#if>" style="<#if ctrl.getQuickSearchWidth() gt 0>width: ${ctrl.getQuickSearchWidth()?c}px;</#if>"></i-input>
</#if>
<div v-if="filterFields.length > 0" class="filter-group">
<template v-for="(item, index) of filterItems">
<filter-item :key="index" :data="item" :filterFields="filterFields">
<template slot-scope="{data}">
<#if ctrl.getPSSearchBarFilters()??>
<#list ctrl.getPSSearchBarFilters() as filter>
<template v-if="Object.is(data.field, '<#if filter.getPSDEField()??>${filter.getPSDEField().getCodeName()?lower_case}<#else>${filter.getName()}</#if>')">
${P.getEditorCode(filter, "EDITOR.vue").code}
</template>
</#list>
</#if>
</template>
</filter-item>
</template>
</div>
</div>
</template>
<#ibizinclude>
......@@ -18,44 +33,26 @@
public query: string = '';
/**
* 快速搜索值
* 过滤属性集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public filterItems: any[] = [
public filterFields: any[] = [
<#if ctrl.getPSSearchBarFilters()??>
<#list ctrl.getPSSearchBarFilters() as filter>
{ label: '${filter.getCaption()}', prop: '${filter.getName()}', editorType: '${filter.getEditorType()}'<#if filter.getEditorWidth() gt 0>, editorWidth: ${filter.getEditorWidth()?c}</#if> },
{ label: '${filter.getCaption()}', prop: '<#if filter.getPSDEField()??>${filter.getPSDEField().getCodeName()?lower_case}<#else>${filter.getName()}</#if>', editorType: '${filter.getEditorType()}'<#if filter.getEditorWidth() gt 0>, editorWidth: ${filter.getEditorWidth()?c}</#if> },
</#list>
</#if>
];
/**
* 过滤模式
* 过滤项集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public filterModels: any[] = [
{ name: 'AND', value: '$and' },
{ name: 'OR', value: '$or' },
{ name: 'EQ', value: '$eq' },
{ name: 'NE', value: '$ne' },
{ name: 'GT', value: '$gt' },
{ name: 'GE', value: '$gte' },
{ name: 'LT', value: '$lt' },
{ name: 'LE', value: '$lte' },
{ name: 'IS_NULL', value: '$null' },
{ name: 'IS_NOT_NULL', value: '$notNull' },
{ name: 'IN', value: '$in' },
{ name: 'NOTIN', value: '$notIn' },
{ name: 'LIKE', value: '$like' },
{ name: 'LIFTLIKE', value: '$startsWith' },
{ name: 'RIGHTLIKE', value: '$endsWith' },
{ name: 'EXISTS', value: '$exists' },
{ name: 'NOTEXISTS', value: '$notExists' }
];
public filterItems: any[] = [];
/**
* 获取多项数据
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册