|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div>
|
|
|
- <ul
|
|
|
+ <!-- <ul
|
|
|
class="nav nav-tabs m-row"
|
|
|
role="tablist"
|
|
|
>
|
|
|
@@ -18,13 +18,10 @@
|
|
|
<a @click="changeSearch(false)">{{ $t('lang.QueryCondition.advancedQuery') }}</a>
|
|
|
</li>
|
|
|
<slot name="header" :is-simple="isSimple" />
|
|
|
- </ul>
|
|
|
+ </ul> -->
|
|
|
|
|
|
- <div class="tab-content">
|
|
|
- <div
|
|
|
- class="tab-pane"
|
|
|
- :class="{'active': isSimple === true}"
|
|
|
- >
|
|
|
+ <div>
|
|
|
+ <div>
|
|
|
<QueryConditionSimple
|
|
|
ref="queryConditionSimple"
|
|
|
:info-buttons="infoButtons"
|
|
|
@@ -38,20 +35,27 @@
|
|
|
</div>
|
|
|
|
|
|
<div
|
|
|
- class="tab-pane"
|
|
|
- :class="{'active': isSimple === false}"
|
|
|
+ v-show="isComplex"
|
|
|
>
|
|
|
- <QueryConditionComplex
|
|
|
- ref="queryConditionComplex"
|
|
|
- :info-window-no="infoWindowNo"
|
|
|
- :filter-fields="filterFields"
|
|
|
- :info-buttons="infoButtons"
|
|
|
- :is-search-widget="isSearchWidget"
|
|
|
- :show-button="showButton"
|
|
|
- @complex-search="complexSearch"
|
|
|
- @execute-process="executeProcess($event)"
|
|
|
- @execute-export="executeExport"
|
|
|
- />
|
|
|
+ <a-drawer
|
|
|
+ v-model:visible="searchVisible"
|
|
|
+ title="高级查询"
|
|
|
+ width="440px"
|
|
|
+ placement="right"
|
|
|
+ @close="closeSearch"
|
|
|
+ >
|
|
|
+ <QueryConditionComplex
|
|
|
+ ref="queryConditionComplex"
|
|
|
+ :info-window-no="infoWindowNo"
|
|
|
+ :filter-fields="filterFields"
|
|
|
+ :info-buttons="infoButtons"
|
|
|
+ :is-search-widget="isSearchWidget"
|
|
|
+ :show-button="showButton"
|
|
|
+ @complex-search="complexSearch"
|
|
|
+ @execute-process="executeProcess($event)"
|
|
|
+ @execute-export="executeExport"
|
|
|
+ />
|
|
|
+ </a-drawer>
|
|
|
</div>
|
|
|
<slot name="body" />
|
|
|
</div>
|
|
|
@@ -92,10 +96,14 @@ export default {
|
|
|
type: Boolean,
|
|
|
default: null,
|
|
|
},
|
|
|
+ 'isComplex':{
|
|
|
+ type: Boolean,
|
|
|
+ default: false,
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
|
|
|
- emits: ['simpleSearch', 'complexSearch', 'refreshSearch', 'executeProcess', 'executeExport', 'changeSearch'],
|
|
|
+ emits: ['simpleSearch', 'complexSearch','openComplex', 'refreshSearch', 'executeProcess', 'executeExport', 'changeSearch'],
|
|
|
|
|
|
data: function () {
|
|
|
return {
|
|
|
@@ -103,6 +111,7 @@ export default {
|
|
|
isSimple: true,
|
|
|
filterFields: [],
|
|
|
selectedText: [],
|
|
|
+ searchVisible:false,
|
|
|
};
|
|
|
},
|
|
|
|
|
|
@@ -132,6 +141,9 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
|
|
|
+ isComplex(newVal){
|
|
|
+ this.searchVisible = newVal;
|
|
|
+ },
|
|
|
|
|
|
|
|
|
},
|
|
|
@@ -145,7 +157,10 @@ export default {
|
|
|
isSimpleQuery: function () {
|
|
|
return this.isSimple === true;
|
|
|
},
|
|
|
-
|
|
|
+ closeSearch(){
|
|
|
+ this.searchVisible = false;
|
|
|
+ this.$emit('openComplex',false);
|
|
|
+ },
|
|
|
/**
|
|
|
* 获取查询条件供外部调用
|
|
|
* @return {Object} 查询条件
|
|
|
@@ -153,9 +168,9 @@ export default {
|
|
|
getQueryCondition: function () {
|
|
|
var _self = this;
|
|
|
var values = [];
|
|
|
- if (_self.isSimple === true) {
|
|
|
+ if (_self.isComplex === false) {
|
|
|
values = this.$refs.queryConditionSimple.getQueryCondition();
|
|
|
- } else if (_self.isSimple === false) {
|
|
|
+ } else if (_self.isComplex === true) {
|
|
|
values = this.$refs.queryConditionComplex.getQueryCondition();
|
|
|
}
|
|
|
return values;
|