Browse Source

排序问题处理

XMLWAN 4 years ago
parent
commit
98b6247659
3 changed files with 10 additions and 7 deletions
  1. 2 2
      config/dev.env.js
  2. 2 2
      config/prod.env.js
  3. 6 3
      src/pages/advice/DialysisAdviceTable.vue

+ 2 - 2
config/dev.env.js View File

@@ -5,8 +5,8 @@ const prodEnv = require("./prod.env");
5 5
 module.exports = merge(prodEnv, {
6 6
   NODE_ENV: '"development"',
7 7
   //BASE_API: '"https://api.xt.kuyicloud.com"'
8
-  // BASE_API: '"http://localhost:9531"'
9
-  BASE_API: '"http://localhost:9529"'
8
+  BASE_API: '"http://localhost:9531"'
9
+  // BASE_API: '"http://localhost:9529"'
10 10
   //http://api.xt.test.sgjyun.com http://localhost:9529
11 11
   // BASE_API: '"http://api.xt.test.sgjyun.com"'
12 12
   // BASE_API: '"https://api.xt.kuyicloud.com"'

+ 2 - 2
config/prod.env.js View File

@@ -1,8 +1,8 @@
1 1
 "use strict";
2 2
 module.exports = {
3 3
   NODE_ENV: '"production"',
4
-  BASE_API: '"http://new_mobile.xt.api.sgjyun.com"'
5
-  // BASE_API: '"https://api.xt.kuyicloud.com"'
4
+  //BASE_API: '"http://new_mobile.xt.api.sgjyun.com"'
5
+  BASE_API: '"https://api.xt.kuyicloud.com"'
6 6
   // BASE_API:'"http://localhost:9529"',
7 7
   // BASE_API: '"http://api.xt.test.sgjyun.com"'
8 8
   // http://api.xt.test.sgjyun.com

+ 6 - 3
src/pages/advice/DialysisAdviceTable.vue View File

@@ -446,14 +446,17 @@ export default {
446 446
               schedules[i].patient.dialysis_no
447 447
             );
448 448
           }
449
-          // console.log("schedules", schedules);
449
+          console.log("schedules", schedules);
450 450
 
451 451
           var arr = [];
452 452
           for (let j = 0; j < schedules.length; j++) {
453 453
             arr.push(schedules[j].dialysis_no);
454 454
           }
455
-          arr.sort();
456
-          // console.log("arr", arr);
455
+          arr.sort(function(a, b) {
456
+            return a - b;
457
+          });
458
+          console.log("arr", arr);
459
+
457 460
           var arrTwo = [];
458 461
           for (let i = 0; i < arr.length; i++) {
459 462
             for (let j = 0; j < schedules.length; j++) {