修改排序导致的查询慢问题

This commit is contained in:
wanggeng 2021-08-17 10:07:57 +08:00
parent 19b0d78ad5
commit 975cd48215

View File

@ -51,7 +51,8 @@
var laydate = layui.laydate;
var common = layui.common;
var resizeTimeout = null;
var tableUrl = 'api/datareal/listpage?instrumentId={instrumentId}&descOrderBy={descOrderBy}';
// var tableUrl = 'api/datareal/listpage?instrumentId={instrumentId}&descOrderBy={descOrderBy}';
var tableUrl = 'api/datareal/listpage?instrumentId={instrumentId}';
var instrumentId = top.restAjax.params(window.location.href).instrumentId;
// 初始化表格
@ -59,7 +60,7 @@
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, [instrumentId, 'gmtCreate']),
url: top.restAjax.path(tableUrl, [instrumentId]),
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 60,
limit: 20,
@ -168,7 +169,7 @@
// 重载表格
function reloadTable(currentPage) {
table.reload('dataTable', {
url: top.restAjax.path(tableUrl, [instrumentId, 'gmtCreate']),
url: top.restAjax.path(tableUrl, [instrumentId]),
where: {
keywords: $('#keywords').val(),
startTime: $('#startTime').val(),