search

Home  >  Q&A  >  body text

javascript - 单个控件多个字段搜索

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

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

部分代码如下

<p 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>
</p>
$scope.search = function () {
    $scope.searchInfos.page = 1; //点击搜索时,传给后台的P参数置为1
    $scope.currentPage = 1;
    $scope.inpatientList();
}
某草草某草草2743 days ago609

reply all(1)I'll reply

  • 为情所困

    为情所困2017-05-15 17:16:05

    filter: Function
    Do your filtering in the function

    reply
    0
  • Cancelreply