el-input、el-date-picker、el-select搜索框筛选数据

1、表格样式.

<div class="deploy-searchInput">

<el-input

class="deploy"

v-model="deployList.name"

placeholder="请输入人员姓名、身份证号、行业"

clearable

@input="handleSearchName"

></el-input>

<el-date-picker

v-model="searchTime"

@change="handleSearchTime"

placeholder="请输入检验时间搜索"

type="datetimerange"

start-placeholder="开始日期"

end-placeholder="结束日期"

style="width: 230px; margin-left: 20px"

>

</el-date-picker>

<el-select

clearable

v-model="deployList.checkResult"

placeholder="选择核查结果"

style="margin-left: 20px"

class="checkRes deploy-right"

@change="handleSearchResult"

>

<el-option

v-for="item in checkOption"

:key="item.value"

:label="item.label"

:value="item.value"

>

</el-option>

</el-select>

<el-select

clearable

v-model="deployList.disposeStatus"

placeholder="选择处置状态"

class="checkStatus deploy-right"

@change="handleSearchStatus"

>

<el-option

v-for="item in disposeOption"

:key="item.value"

:label="item.label"

:value="item.value"

></el-option>

</el-select>

<span class="deploy-search-btn deploy-right" @click="search">搜索</span>

</div>

</div>

2、均有change事件 【change 仅在输入框失去焦点或用户按下回车时触发】

3、

/**

* 点击搜索人员姓名

*/

handleSearchName(name) {

this.deployList.name = name;

this.deployList.page = 1;

this.fetchData();

},

/**

* 点击搜索核验时间

*/

handleSearchTime(time) {

if (time != null) {

this.deployList.startData = time[0];

this.deployList.endData = time[0];

} else {

this.deployList.startData = "";

this.deployList.endData = "";

}

this.deployList.page = 1;

this.fetchData();

},

/**

* 点击搜索核验结果

*/

handleSearchResult(checkResult) {

this.deployList.checkResult = checkResult;

this.deployList.page = 1;

this.fetchData(); // 重新调取表格接口数据

},

/**

* 点击搜索处置状态

*/

handleSearchStatus(disposeStatus) {

this.deployList.disposeStatus = disposeStatus;

this.deployList.page = 1;

this.fetchData();

},

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值