Sfoglia il codice sorgente

Merge branch 'master' of http://git.shengws.com/csx/Pad_New

XMLWAN 4 anni fa
parent
commit
8b9174ae61
1 ha cambiato i file con 21 aggiunte e 6 eliminazioni
  1. 21 6
      src/pages/advice/DialysisAdviceTable.vue

+ 21 - 6
src/pages/advice/DialysisAdviceTable.vue Vedi File

@@ -1,10 +1,10 @@
1 1
 <template>
2 2
   <div class="mainBox">
3 3
     <van-sticky>
4
-    <div class="floatLeft">
5
-      <i class="iconfont icon-zuojiantou jiantou" @click="$router.go(-1)"></i>
6
-      <span class="titleName">透析医嘱</span>
7
-    </div>
4
+      <div class="floatLeft">
5
+        <i class="iconfont icon-zuojiantou jiantou" @click="$router.go(-1)"></i>
6
+        <span class="titleName">透析医嘱</span>
7
+      </div>
8 8
     </van-sticky>
9 9
     <div class="choice">
10 10
       <ul>
@@ -122,7 +122,7 @@
122 122
                 <!-- <td
123 123
                   v-if="advice_index == 0"
124 124
                   :rowspan="group.advices.length"
125
-                >{{ getAdaviceType(advice.advice_type, advice.parent_id) }}</td> -->
125
+                >{{ getAdaviceType(advice.advice_type, advice.parent_id) }}</td>-->
126 126
                 <td v-if="advice_index == 0" :rowspan="group.advices.length">
127 127
                   {{
128 128
                   advice.parent_id == 0
@@ -461,6 +461,14 @@ export default {
461 461
               }
462 462
             }
463 463
           }
464
+
465
+          arrTwo.map((item, index) => {
466
+            // console.log(item);
467
+            // item.doctor_advice.map((items, i) => {
468
+            //   console.log(items);
469
+            // });
470
+            item.doctor_advice.sort(this.compare("start_time"));
471
+          });
464 472
           console.log("arrTwo", arrTwo);
465 473
           schedules = arrTwo;
466 474
           var zoneMap = {};
@@ -499,7 +507,14 @@ export default {
499 507
         }
500 508
       });
501 509
     },
502
-    adviceDesc(advice) {}
510
+    adviceDesc(advice) {},
511
+    compare(property) {
512
+      return function(a, b) {
513
+        var value1 = a[property];
514
+        var value2 = b[property];
515
+        return value1 - value2;
516
+      };
517
+    }
503 518
   }
504 519
 };
505 520
 </script>