--增加性能数据排序,修改查询黄金指标时长
This commit is contained in:
@@ -3,13 +3,14 @@ import { request } from '@/plugins/http-fetch';
|
|||||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询日志列表
|
* 查询黄金指标数据
|
||||||
* @param query 查询参数
|
* @param query 查询参数
|
||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
export async function listgoldData(query: Record<string, any>) {
|
export async function listgoldData(query: Record<string, any>) {
|
||||||
let totalSQL = 'select count(*) as total from gold_kpi where 1=1 ';
|
let totalSQL = 'select count(*) as total from gold_kpi where 1=1 ';
|
||||||
let rowsSQL = 'SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 ';
|
let rowsSQL =
|
||||||
|
'SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 ';
|
||||||
|
|
||||||
// 查询
|
// 查询
|
||||||
let querySQL = '';
|
let querySQL = '';
|
||||||
@@ -43,6 +44,7 @@ export async function listgoldData(query: Record<string, any>) {
|
|||||||
totalSQL: totalSQL + querySQL,
|
totalSQL: totalSQL + querySQL,
|
||||||
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
|
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
|
||||||
},
|
},
|
||||||
|
timeout: 30 * 1000,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 解析数据
|
// 解析数据
|
||||||
|
|||||||
@@ -109,6 +109,9 @@ let tableColumns: ColumnsType = [
|
|||||||
title: '值',
|
title: '值',
|
||||||
dataIndex: 'value',
|
dataIndex: 'value',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
sorter: (a: any, b: any) => {
|
||||||
|
return 1;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '开始时间',
|
title: '开始时间',
|
||||||
@@ -118,6 +121,9 @@ let tableColumns: ColumnsType = [
|
|||||||
if (!opt.value) return '';
|
if (!opt.value) return '';
|
||||||
return parseDateToStr(opt.value);
|
return parseDateToStr(opt.value);
|
||||||
},
|
},
|
||||||
|
sorter: (a: any, b: any) => {
|
||||||
|
return 1;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '结束时间',
|
title: '结束时间',
|
||||||
@@ -127,6 +133,9 @@ let tableColumns: ColumnsType = [
|
|||||||
if (!opt.value) return '';
|
if (!opt.value) return '';
|
||||||
return parseDateToStr(opt.value);
|
return parseDateToStr(opt.value);
|
||||||
},
|
},
|
||||||
|
sorter: (a: any, b: any) => {
|
||||||
|
return 1;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user