Bladeren bron

排序问题处理

XMLWAN 4 jaren geleden
bovenliggende
commit
98b6247659
3 gewijzigde bestanden met toevoegingen van 10 en 7 verwijderingen
  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 Bestand weergeven

5
 module.exports = merge(prodEnv, {
5
 module.exports = merge(prodEnv, {
6
   NODE_ENV: '"development"',
6
   NODE_ENV: '"development"',
7
   //BASE_API: '"https://api.xt.kuyicloud.com"'
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
   //http://api.xt.test.sgjyun.com http://localhost:9529
10
   //http://api.xt.test.sgjyun.com http://localhost:9529
11
   // BASE_API: '"http://api.xt.test.sgjyun.com"'
11
   // BASE_API: '"http://api.xt.test.sgjyun.com"'
12
   // BASE_API: '"https://api.xt.kuyicloud.com"'
12
   // BASE_API: '"https://api.xt.kuyicloud.com"'

+ 2 - 2
config/prod.env.js Bestand weergeven

1
 "use strict";
1
 "use strict";
2
 module.exports = {
2
 module.exports = {
3
   NODE_ENV: '"production"',
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
   // BASE_API:'"http://localhost:9529"',
6
   // BASE_API:'"http://localhost:9529"',
7
   // BASE_API: '"http://api.xt.test.sgjyun.com"'
7
   // BASE_API: '"http://api.xt.test.sgjyun.com"'
8
   // http://api.xt.test.sgjyun.com
8
   // http://api.xt.test.sgjyun.com

+ 6 - 3
src/pages/advice/DialysisAdviceTable.vue Bestand weergeven

446
               schedules[i].patient.dialysis_no
446
               schedules[i].patient.dialysis_no
447
             );
447
             );
448
           }
448
           }
449
-          // console.log("schedules", schedules);
449
+          console.log("schedules", schedules);
450
 
450
 
451
           var arr = [];
451
           var arr = [];
452
           for (let j = 0; j < schedules.length; j++) {
452
           for (let j = 0; j < schedules.length; j++) {
453
             arr.push(schedules[j].dialysis_no);
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
           var arrTwo = [];
460
           var arrTwo = [];
458
           for (let i = 0; i < arr.length; i++) {
461
           for (let i = 0; i < arr.length; i++) {
459
             for (let j = 0; j < schedules.length; j++) {
462
             for (let j = 0; j < schedules.length; j++) {