//插入查询记录
function insertHistoryRecord() {
var getRecord = window.localStorage.getItem("record" + $rootScope.userInfo.id);
var recordArr = [];
if (getRecord) {
recordArr = getRecord.split(',');
}
if (recordArr.length == 0 || recordArr.indexOf(vm.queryFilter) == -1) {
//首次查询排首位
var temp = [vm.queryFilter].concat(recordArr);
window.localStorage.setItem("record" + $rootScope.userInfo.id, temp);
}else if(recordArr.length>1 && recordArr.indexOf(vm.queryFilter) != -1){
//历史查询排在首位
recordArr.remove(vm.queryFilter);
var temp = [vm.queryFilter].concat(recordArr);
window.localStorage.setItem("record" + $rootScope.userInfo.id, temp);
}
$(".recordDiv", $element).hide();
}