| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <!-- 简单查询过滤 -->
- <template>
- <div>
- <div>
- <input
- v-model="simpleConditionValue"
- autocomplete="off"
- type="text"
- class="form-control input-simple"
- :placeholder="$t('lang.QueryConditionSimple.enterSearchCriteria')"
- @keyup.enter="simpleSearch"
- />
- </div>
- <div v-if="showButton" style="margin-top: 5px">
- <div>
- <button
- id="filter"
- type="button"
- class="btn btn-default m-btn"
- @click="simpleSearch()"
- >
- {{ $t('lang.QueryConditionSimple.filter') }}
- </button>
- <button
- id="filter"
- type="button"
- class="btn btn-default m-btn"
- @click="refreshSearch()"
- >
- {{ $t('lang.QueryConditionSimple.refresh') }}
- </button>
- <template v-if="!isSearchWidget">
- <button
- type="button"
- class="btn btn-default m-btn"
- @click="executeExport()"
- >
- {{ $t('lang.QueryConditionSimple.export') }}
- </button>
- <template v-for="infoButton in infoButtons" :key="infoButton.name">
- <button
- v-tooltip.right="Language.getHelpTrl($i18n.locale, infoButton)"
- class="btn btn-default btn-process m-btn"
- @click="executeProcess(infoButton)"
- >
- {{ Language.getNameTrl($i18n.locale, infoButton) }}
- </button>
- </template>
- </template>
- </div>
- </div>
- </div>
- </template>
- <script>
- import Language from '../../common/Language.js';
- export default {
- components: {
- },
- props: {
- 'infoButtons': {
- type: Array,
- default: null,
- },
- 'isSearchWidget':{
- type: Boolean,
- default: false,
- },
- 'showButton':{
- type: Boolean,
- default: false,
- },
- },
- emits: ['simpleSearch', 'refreshSearch', 'executeExport', 'executeProcess'],
- data: function () {
- this.Language = Language;
- return {
- simpleConditionValue: '',
- selectedText: [],
- };
- },
- methods: {
- /**
- * 触发简单查询
- * @return {void}
- */
- simpleSearch: function () {
- this.$emit('simpleSearch');
- },
- /**
- * 刷新搜索
- */
- refreshSearch: function () {
- this.$emit('refreshSearch');
- },
- /**
- * 执行导出
- * @return {void}
- */
- executeExport: function () {
- this.$emit('executeExport');
- },
- /**
- * 执行流程
- *
- */
- executeProcess: function (infoButton) {
- this.$emit('executeProcess', infoButton);
- },
- /**
- * 获取查询条件供外部调用
- * @return {Object} 查询条件
- */
- getQueryCondition: function () {
- var _self = this;
- return _self.simpleConditionValue;
-
- },
- },
- };
- </script>
- <style scoped>
- .m-row {
- margin-bottom: 5px;
- text-align: left;
- }
- .input-simple {
- width: 100% !important;
- }
- .m-btn {
- float: left;
- margin-right: 5px;
- }
- </style>
|