From a5814c8100273b3fcfec556c91449757edba9dbe Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 25 Oct 2019 12:49:22 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/static/js/jumpserver.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/static/js/jumpserver.js b/apps/static/js/jumpserver.js index 2ef2397d6..0a031384b 100644 --- a/apps/static/js/jumpserver.js +++ b/apps/static/js/jumpserver.js @@ -646,9 +646,13 @@ jumpserver.initServerSideDataTable = function (options) { if (data.search !== null) { var searchValue = data.search.value; var searchFilter = parseTableFilter(searchValue); - $.each(searchFilter, function (k, v) { - data[k] = v - }) + if (Object.keys(searchFilter).length === 0) { + data.search = searchValue; + } else { + $.each(searchFilter, function (k, v) { + data[k] = v + }) + } } if (data.order !== null && data.order.length === 1) { var col = data.order[0].column;