diff --git a/src/App.vue b/src/App.vue
index 42b9793d..4d666e25 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -4,7 +4,6 @@
diff --git a/src/components/advancedSearch/Index.vue b/src/components/advancedSearch/Index.vue
index 045e3413..5489909a 100644
--- a/src/components/advancedSearch/Index.vue
+++ b/src/components/advancedSearch/Index.vue
@@ -4,14 +4,19 @@
>
@@ -30,6 +35,12 @@ export default {
TagMode,
TextMode
},
+ data () {
+ return {
+ sql: null,
+ metaList: null
+ }
+ },
props: {
// 默认模式,tag | text
defaultMode: String,
@@ -49,11 +60,20 @@ export default {
connectionList: Array
},
methods: {
- search () {
-
+ search (metaList, formatSql) {
+ this.$emit('search', formatSql)
},
- changeMode (mode) {
+ changeMode (mode, data) {
this.searchMode = mode
+ if (mode === 'text') {
+ this.sql = data
+ } else if (mode === 'tag') {
+ this.metaList = data
+ }
+ },
+ addParams (params) {
+ this.$refs.tagMode && this.$refs.tagMode.addParams(params)
+ this.$refs.textMode && this.$refs.textMode.addParams(params)
}
},
setup (props) {
diff --git a/src/components/advancedSearch/TagMode.vue b/src/components/advancedSearch/TagMode.vue
index 40b14965..3c2f5efd 100644
--- a/src/components/advancedSearch/TagMode.vue
+++ b/src/components/advancedSearch/TagMode.vue
@@ -75,7 +75,7 @@
{{$t('entities.advancedSearch.add')}}