Browse Source

排序优化

kukuasir@vip.qq.com 1 year ago
parent
commit
353ebec341
2 changed files with 5 additions and 5 deletions
  1. 4 4
      src/js/sort.js
  2. 1 1
      src/views/equip-management/report/list.vue

+ 4 - 4
src/js/sort.js

@@ -5,7 +5,7 @@ export function sortBoxListByHost(data, sort) {
   for (let i = 0; i < data.length; i++) {
     const box = data[i];
     const hostCtrl = box.hostCtrl || [];
-    let maxVal = -1;
+    let maxVal = -99;
     for (let j = 0; j < hostCtrl.length; j++) {
       const hp = hostCtrl[j];
       if (
@@ -28,7 +28,7 @@ export function sortBoxListByNewTrend(data, sort) {
   for (let i = 0; i < data.length; i++) {
     const box = data[i];
     const newTrendCtrl = box.newTrendCtrl || [];
-    let maxVal = -1;
+    let maxVal = -99;
     for (let j = 0; j < newTrendCtrl.length; j++) {
       const dh = newTrendCtrl[j];
       if (dh[sort.prop] > maxVal && box.runStatus == 1) {
@@ -46,7 +46,7 @@ export function sortBoxListByHeatExchange(data, sort) {
   for (let i = 0; i < data.length; i++) {
     const box = data[i];
     const heatExchangeCtrl = box.hex || [];
-    let maxVal = -1;
+    let maxVal = -99;
     for (let j = 0; j < heatExchangeCtrl.length; j++) {
       const hex = heatExchangeCtrl[j];
       if (hex[sort.prop] > maxVal && box.runStatus == 1) {
@@ -71,7 +71,7 @@ export function sortBoxListByEnd(data, sort) {
       }
       box.max_end_exception_num = total_end_exception_num;
     } else {
-      let maxVal = -1;
+      let maxVal = -99;
       for (let j = 0; j < endCtrl.length; j++) {
         const end = endCtrl[j];
         if (end[sort.prop] > maxVal && box.runStatus == 1) {

+ 1 - 1
src/views/equip-management/report/list.vue

@@ -992,7 +992,7 @@ export default {
 }
 
 .ml10 {
-	margin-left: 10px;
+	margin-left: 0;
 }
 
 .mt10 {