|
@@ -7,10 +7,10 @@
|
|
|
<div class="mui-content-padded flew-items flew-sp">
|
|
|
<div class="vongi-xzdw-search mui-col-xs-10">
|
|
|
<input @focusin="searchIn" @focusout="searchOut" @keyup.enter="doSearchCompany" v-model="searchForm.name" type="search"
|
|
|
- placeholder="请输入公司名称">
|
|
|
+ placeholder="请输入公司名称">
|
|
|
<span class="mui-icon mui-icon-search"></span>
|
|
|
</div>
|
|
|
- <a class="mui-btn mui-btn-primary">搜索</a>
|
|
|
+ <a class="mui-btn mui-btn-primary" @click="doSearchCompany">搜索</a>
|
|
|
</div>
|
|
|
<div v-show="showType=='select'">
|
|
|
<div class="mui-content-padded fyy-date mui-clearfix">
|
|
@@ -226,7 +226,15 @@
|
|
|
},
|
|
|
//搜索
|
|
|
doSearchCompany() {
|
|
|
- this.getSearchCompanyList();
|
|
|
+ //去除字符串里的空格
|
|
|
+ this.searchForm.name = this.searchForm.name.replace(/(^\s*)|(\s*$)/g, "");
|
|
|
+ if (!this.searchForm.name) {
|
|
|
+ mui.toast('请输入关键词');
|
|
|
+ } else {
|
|
|
+ this.searchForm.pageIndex = 1;
|
|
|
+ this.getSearchCompanyList();
|
|
|
+ }
|
|
|
+
|
|
|
/* if (this.inputIng) {
|
|
|
return false
|
|
|
}
|
|
@@ -255,6 +263,8 @@
|
|
|
...response.data
|
|
|
];
|
|
|
}
|
|
|
+ } else if (this.searchForm.pageIndex == 1) {
|
|
|
+ this.searchCompanyList = [];
|
|
|
}
|
|
|
this.searchForm.pageIndex++;
|
|
|
this.inputIng = false;
|