Browse Source

搜索

master
赵鹏 1 month ago
parent
commit
8ab1c73f4f
  1. 13
      pages/enterprise.vue
  2. 16
      sub/owner/policy.vue

13
pages/enterprise.vue

@ -4,9 +4,9 @@
<van-search
:value="queryParams.enterprisesName"
placeholder="输入企业名称或类型查询"
@sreach="handleSearch"
@clear="resetQuery('enterpriseName')"
id="sreach"
@change="handleSearch"
/>
<van-dropdown-menu safe-area-tab-bar active-color="#17C653">
<van-dropdown-item
@ -224,16 +224,19 @@ export default {
return data
},
querySelect(v, key) {
this.queryParams.pageNo = 1 //
this.queryParams[key] = v.detail
this.queryEnterprise()
},
handleSearch(e) {
this.queryParams.pageNum = 1 //
this.queryParams.name = e.detail //
this.getPolicyList()
if(e.detail && e.detail.length > 1){
this.queryParams.pageNo = 1 //
this.queryParams.enterprisesName = e.detail //
this.queryEnterprise()
}
},
queryEnterprise() {
this.queryParams.pageNo = 1
this.load = 'loadmore'
this.list = []
this.queryParams.tagList = [

16
sub/owner/policy.vue

@ -6,9 +6,9 @@
<van-search
:value="abc"
placeholder="输入关键字查询"
@search="handleSearch"
id="sreach"
@clear="handleClear"
@change="handleSearch"
/>
</view>
@ -131,14 +131,20 @@ export default {
finally {
this.loadMoreStatus = this.policyList.length >= this.total? 'noMore' :'more'
//
this.isRefreshing = false
//
setTimeout(() => {
this.isRefreshing = false
}, 300) //
}
},
//
handleSearch(e) {
this.pageNum = 1 //
this.searchValue = e.detail //
this.getPolicyList()
if(e.detail && e.detail.length > 1){
this.pageNum = 1 //
this.searchValue = e.detail //
this.getPolicyList()
}
},
//
handleClear() {

Loading…
Cancel
Save