提交 d6f6b08d 编写于 作者: RedPig97's avatar RedPig97

update:搜索栏更新

上级 2f19e2eb
......@@ -2,9 +2,8 @@
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div class="app-searchbar<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>">
<div v-if="filterFields.length > 0" class="filter-group">
<filter-tree :datas="filterItems" :fields="filterFields">
<div class="<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>">
<app-searchbar :items="filterItems" :fields="filterFields">
<template slot-scope="{ data }">
<#if ctrl.getPSSearchBarFilters()??>
<#list ctrl.getPSSearchBarFilters() as filter>
......@@ -14,45 +13,15 @@ ${ctrl.render.code}
</#list>
</#if>
</template>
</filter-tree>
</div>
<div class="search-bar-footer">
<#-- <#if !view.isEnableQuickSearch() && ctrl.getQuickSearchMode() gt 0>
<i-input v-model="query" 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 class="search-bar-action">
<el-select size="small" v-if="historyItems.length > 0" v-model="selectItem" @change="onFilterChange">
<el-option v-for="item in historyItems" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
<i-button type="primary" @click="onSearch">{{ $t('app.searchButton.search') }}</i-button>
<i-button @click="onReset">{{ $t('app.searchButton.reset') }}</i-button>
<Poptip ref="propip" trigger="hover" placement="top-end" :title="$t('app.searchForm.custom')" :width="250" @on-popper-show="openPoper">
<i-button><i class="fa fa-floppy-o" aria-hidden="true"></i></i-button>
<template slot="content">
<div>
<i-input v-model="saveItemName" :placeholder="$t('app.searchForm.title')"></i-input>
<div class="save-action">
<i-button @click="onCancel">{{ $t('app.commonWords.cancel') }}</i-button>
<i-button type="primary" @click="onOk">{{ $t('app.commonWords.save') }}</i-button>
</div>
</div>
</template>
</Poptip>
</div>
</div>
</app-searchbar>
</div>
</#if>
</template>
// 基于 @CONTROL/搜索栏/CONTROL-BASE.vue.ftl 生成
<#assign import_block>
import FilterTree from '@components/filter-tree/filter-tree.vue';
import moment from 'moment';
</#assign>
<#assign component_block>
FilterTree,
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
......@@ -426,7 +395,3 @@ FilterTree,
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/搜索栏/CONTROL.scss.ftl 生成
.search-bar-footer {
height: 32px;
margin-bottom: 6px;
.search-bar-action {
float: right;
display: flex;
align-items: center;
> * {
margin-left: 5px;
.save-action {
text-align: right;
margin-top: 10px;
> * {
margin-left: 5px;
}
}
}
}
}
<#ibizinclude>
../@MACRO/CSS/DEFAULT.scss.ftl
......
......@@ -37,7 +37,7 @@
<#if view.isEnableQuickSearch()>
<i-input v-model="query" class='quick-search-input' @on-enter="onSearch($event)" placeholder="<@getQuickSearchPlaceholder view />" />
</#if>
<#if view.getQuickPSDESearchForm()?? || view.hasPSControl('searchform')>
<#if view.getQuickPSDESearchForm()?? || view.hasPSControl('searchform') || view.hasPSControl('searchbar')>
<div class="search-form-toggle" @click="toggleSearchForm">
<i v-if="!isExpandSearchForm" class="el-icon-plus" />
<i v-else class="el-icon-minus" />
......@@ -54,7 +54,7 @@
${P.getCtrlCode('searchform', 'CONTROL.html').code}
</#if>
</template>
<#if view.getQuickPSDESearchForm()?? || view.hasPSControl('searchform')>
<#if view.getQuickPSDESearchForm()?? || view.hasPSControl('searchform') || view.hasPSControl('searchbar')>
<template #headerBottom>
<i-button @click="onReset">重置</i-button>
<i-button type="primary" @click="onSearch">搜索</i-button>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册