|
@@ -117,6 +117,12 @@
|
|
|
:key="index"
|
|
|
header-align="center"
|
|
|
show-overflow-tooltip
|
|
|
+ sortable
|
|
|
+ :sort-method="
|
|
|
+ (a, b) => {
|
|
|
+ return thSort(a, b, item);
|
|
|
+ }
|
|
|
+ "
|
|
|
>
|
|
|
<template #default="{ row }">
|
|
|
<div class="bar">
|
|
@@ -318,11 +324,12 @@ function getTableList() {
|
|
|
stationid: state.changZhan || "",
|
|
|
begin: state.starttime,
|
|
|
end: state.endtime,
|
|
|
- timeType: "s",
|
|
|
+ timeType: "m",
|
|
|
components: state.components,
|
|
|
modelId: state.modelId,
|
|
|
alarmIds: state.alarmIds,
|
|
|
}).then((res) => {
|
|
|
+ console.log(11111, res);
|
|
|
if (res.length) {
|
|
|
let tableData = [];
|
|
|
let tHeard = [];
|
|
@@ -346,6 +353,8 @@ function getTableList() {
|
|
|
}
|
|
|
wtItem[`${cEle.alarmid}_count`] = cEle.count;
|
|
|
wtItem[`${cEle.alarmid}_time`] = cEle.time;
|
|
|
+ // wtItem[`${cEle.alarmid}_count`] = getRandomInt(1, 1000);
|
|
|
+ // wtItem[`${cEle.alarmid}_time`] = getRandomInt(1, 1000);
|
|
|
wtItem["wtname"] = cEle.windturbineCode;
|
|
|
});
|
|
|
tableData.push(wtItem);
|
|
@@ -360,6 +369,16 @@ function getTableList() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+const getRandomInt = function (min, max) {
|
|
|
+ min = Math.ceil(min);
|
|
|
+ max = Math.floor(max);
|
|
|
+ return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
|
+};
|
|
|
+
|
|
|
+const thSort = function (a, b, item) {
|
|
|
+ return a[`${item.code}_count`] - b[`${item.code}_count`];
|
|
|
+};
|
|
|
+
|
|
|
// // 单元格点击事件
|
|
|
// handle(row, column, event, cell) {
|
|
|
// let parts =
|