|  | @@ -1136,7 +1136,7 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |      $('#list-input').on('blur', function () {
 | 
	
		
			
				|  |  |          const select = parseInt($('#select-list').val());
 | 
	
		
			
				|  |  |          const value = _.trim($(this).val());
 | 
	
		
			
				|  |  | -        const valueList = _.slice(_.without(_.uniq(value.split(' ')), ''), 0, 10);
 | 
	
		
			
				|  |  | +        const valueList = _.slice(_.without(_.uniq(_.replace(value, /\t/g, ' ').split(' ')), ''), 0, 10);
 | 
	
		
			
				|  |  |          console.log(valueList);
 | 
	
		
			
				|  |  |          // 判断是否存在多个分词,以换行或空格分隔,多个则显示左侧菜单
 | 
	
		
			
				|  |  |          if (value !== '' && valueList.length > 1) {
 | 
	
	
		
			
				|  | @@ -1145,14 +1145,15 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              $('#table-list').addClass('col-9').removeClass('col-12');
 | 
	
		
			
				|  |  |              $('#table-list').siblings('.col-3').show();
 | 
	
		
			
				|  |  | -            $('#list-search-keyword').html('<a href="javascript:void(0);" data-keyword="" class="list-group-item list-group-item-action active">全部</a>');
 | 
	
		
			
				|  |  | +            $('#list-search-keyword').html('<tr data-keyword="" class="text-white bg-primary"><td class="border-primary">全部</td></tr>');
 | 
	
		
			
				|  |  |              for (const v of valueList) {
 | 
	
		
			
				|  |  | -                $('#list-search-keyword').append(`<a href="javascript:void(0);" data-keyword="${v}" class="list-group-item list-group-item-action">${v}</a>`);
 | 
	
		
			
				|  |  | +                $('#list-search-keyword').append(`<tr data-keyword="${v}" class=""><td>${v}</td></tr>`);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            $('#list-input').val(valueList.join(' '));
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              $('#table-list').addClass('col-12').removeClass('col-9');
 | 
	
		
			
				|  |  |              $('#table-list').siblings('.col-3').hide();
 | 
	
		
			
				|  |  | -            $('#list-search-keyword').html('<a href="javascript:void(0);" data-keyword="" class="list-group-item list-group-item-action active">全部</a>');
 | 
	
		
			
				|  |  | +            $('#list-search-keyword').html('<tr data-keyword="" class="text-white bg-primary border-primary"><td class="border-primary">全部</td></tr>');
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          let showListData = changeListData;
 | 
	
		
			
				|  |  |          if (select === 1 && value !== '') {
 | 
	
	
		
			
				|  | @@ -1198,13 +1199,61 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |          $('#code-list').html('');
 | 
	
		
			
				|  |  |          $('#code-select-all').prop('checked', false);
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  | +    // 双击编辑搜索值
 | 
	
		
			
				|  |  | +    $('body').on('dblclick', '#list-search-keyword tr', function () {
 | 
	
		
			
				|  |  | +        if ($(this).attr('data-keyword') !== '') {
 | 
	
		
			
				|  |  | +            $(this).children('td').html(`<input class="form-control form-control-sm" value="">`);
 | 
	
		
			
				|  |  | +            $(this).find('input').focus();
 | 
	
		
			
				|  |  | +            $(this).find('input').val($(this).attr('data-keyword'));
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +    // 光标离开
 | 
	
		
			
				|  |  | +    $('body').on('blur', '#list-search-keyword tr td input', function () {
 | 
	
		
			
				|  |  | +        let val = $(this).val();
 | 
	
		
			
				|  |  | +        const oldVal = $(this).parents('tr').attr('data-keyword');
 | 
	
		
			
				|  |  | +        if (_.trim(val) === '') {
 | 
	
		
			
				|  |  | +            toastr.warning('不能为空');
 | 
	
		
			
				|  |  | +            val = oldVal;
 | 
	
		
			
				|  |  | +        } else if (_.trim(val) === oldVal) {
 | 
	
		
			
				|  |  | +            val = oldVal;
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +            const value = _.trim($('#list-input').val());
 | 
	
		
			
				|  |  | +            const valueList = _.slice(_.without(_.uniq(_.replace(value, /\t/g, ' ').split(' ')), ''), 0, 10);
 | 
	
		
			
				|  |  | +            console.log(_.indexOf(valueList, oldVal), valueList, val, oldVal);
 | 
	
		
			
				|  |  | +            if (_.indexOf(valueList, val) !== -1) {
 | 
	
		
			
				|  |  | +                toastr.warning('已存在相同的检索词');
 | 
	
		
			
				|  |  | +                val = oldVal;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            valueList.splice(_.indexOf(valueList, oldVal), 1, val);
 | 
	
		
			
				|  |  | +            $('#list-input').val(valueList.join(' '));
 | 
	
		
			
				|  |  | +            const select = parseInt($('#select-list').val());
 | 
	
		
			
				|  |  | +            const showListData = _.filter(changeListData, function (c) {
 | 
	
		
			
				|  |  | +                return ((c.code && c.code.indexOf(val) !== -1) || (c.name && c.name.indexOf(val) !== -1)) && (select === 1 ? c.cid : 1);
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            makeListTable(changeListData, showListData);
 | 
	
		
			
				|  |  | +            $('#table-list-select tr').removeClass('table-warning');
 | 
	
		
			
				|  |  | +            $('#code-input').val('');
 | 
	
		
			
				|  |  | +            $('#code-input').siblings('a').hide();
 | 
	
		
			
				|  |  | +            $('#code-list').html('');
 | 
	
		
			
				|  |  | +            $('#code-select-all').prop('checked', false);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        $(this).parents('tr').attr('data-keyword', val);
 | 
	
		
			
				|  |  | +        $(this).parents('td').html(`${val}`);
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +    $('body').on('keypress', '#list-search-keyword tr td input', function () {
 | 
	
		
			
				|  |  | +        if(window.event.keyCode === 13) {
 | 
	
		
			
				|  |  | +            $(this).blur();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +    $("#addlist").draggable({ handle: '.modal-header, .modal-footer'});
 | 
	
		
			
				|  |  |      // 检索关键字切换
 | 
	
		
			
				|  |  | -    $('body').on('click', '#list-search-keyword a', function () {
 | 
	
		
			
				|  |  | -        if (!$(this).hasClass('active')) {
 | 
	
		
			
				|  |  | +    $('body').on('click', '#list-search-keyword tr', function () {
 | 
	
		
			
				|  |  | +        if (!$(this).hasClass('bg-primary')) {
 | 
	
		
			
				|  |  |              const keyword = $(this).attr('data-keyword');
 | 
	
		
			
				|  |  | -            console.log(keyword);
 | 
	
		
			
				|  |  | -            $(this).siblings().removeClass('active');
 | 
	
		
			
				|  |  | -            $(this).addClass('active');
 | 
	
		
			
				|  |  | +            $(this).siblings().removeClass('text-white bg-primary');
 | 
	
		
			
				|  |  | +            $(this).siblings().children('td').removeClass('border-primary');
 | 
	
		
			
				|  |  | +            $(this).addClass('text-white bg-primary');
 | 
	
		
			
				|  |  | +            $(this).children('td').addClass('border-primary');
 | 
	
		
			
				|  |  |              if (keyword === '') {
 | 
	
		
			
				|  |  |                  $('#list-input').blur();
 | 
	
		
			
				|  |  |              } else {
 |