|
|
@@ -32,7 +32,7 @@
|
|
|
</div>
|
|
|
<div class="flex-align-stretch" style="min-width:800px">
|
|
|
<slot name="custom"></slot>
|
|
|
- <el-input style="width:200px;" placeholder="搜索" suffix-icon="el-icon-search" @input="searchChange" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
|
|
|
+ <el-input style="width:200px;" placeholder="搜索" suffix-icon="el-icon-search" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="clearSearch" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
|
|
|
</el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -126,11 +126,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
- searchChange (val) {
|
|
|
- val == '' && this.listData()
|
|
|
+ clearSearch () {
|
|
|
+ this.$store.state.searchValue = ''
|
|
|
+ this.listData(this.param.content.pageNumber = 1)
|
|
|
},
|
|
|
async listData () {
|
|
|
- // console.log(this.activeApp)
|
|
|
+ this.param.content.where.condition = this.searchValue
|
|
|
this.param.id = this.apiId.query
|
|
|
const res = await this.$api.requested(this.param)
|
|
|
this.list = res.data
|
|
|
@@ -232,16 +233,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
watch:{
|
|
|
- $route () {
|
|
|
-
|
|
|
- }
|
|
|
},
|
|
|
mounted () {
|
|
|
this.autoQuery === false?'':this.listData()
|
|
|
},
|
|
|
created () {
|
|
|
this.routerName = this.$route.meta.title
|
|
|
- this.param.content.where.condition = this.searchValue
|
|
|
this.layout = this.tool.tabelCol(this.$route.name)[this.tableName].tablecols
|
|
|
this.tableLayout = this.layout
|
|
|
this.$emit('listCreate',this.param)
|