Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
188 views
in Technique[技术] by (71.8m points)

单个控件多个字段搜索

1、项目中搜索功能可根据后台返回的参数进行搜索图片描述

2、现在只能做到单个字段进行搜索(重新请求数据),当多个字段怎么处理,是进行 filter多个字段搜索么,具体是怎么弄的?

部分代码如下

<div class="form-search m-t-xs m-b-xs inline">
    <input type="text" class="s_input bg-white-only" placeholder="请房间号或患者名字" ng-model="searchInfos.name" ng-keyup="myKeyup($event)">
    <i class="glyphicon glyphicon-search input_enter_icon" ng-click="search()"></i>
</div>
$scope.search = function () {
    $scope.searchInfos.page = 1; //点击搜索时,传给后台的P参数置为1
    $scope.currentPage = 1;
    $scope.inpatientList();
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

filter:函数
函数里面做你的过滤处理


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...