See999 4 anni fa
parent
commit
128fc4f4ef

+ 12 - 1
src/pages/doctorAdvice/components/CourseManagement.vue Vedi File

@@ -123,6 +123,9 @@ import Vue from "vue";
123 123
 import { Dialog } from "vant";
124 124
 const moment = require("moment");
125 125
 export default {
126
+  props: {
127
+    active: Number
128
+  },
126 129
   data() {
127 130
     return {
128 131
       newShow: false,
@@ -256,7 +259,15 @@ export default {
256 259
       });
257 260
     },
258 261
     toCourseDetail(id) {
259
-      this.$router.push("/coursedetail?id=" + id);
262
+      var patientid = this.$route.query.patientid;
263
+      this.$router.push(
264
+        "/coursedetail?id=" +
265
+          id +
266
+          "&patientid=" +
267
+          patientid +
268
+          "&active=" +
269
+          this.active
270
+      );
260 271
     },
261 272
     getPatientDetail(patientid) {
262 273
       getPatientDetail(patientid).then(response => {

+ 11 - 1
src/pages/doctorAdvice/components/DryWeight.vue Vedi File

@@ -83,6 +83,9 @@ import { uParseTime } from "@/utils/tools";
83 83
 import { Dialog } from "vant";
84 84
 const moment = require("moment");
85 85
 export default {
86
+  props: {
87
+    active: Number
88
+  },
86 89
   data() {
87 90
     return {
88 91
       newShow: false,
@@ -230,7 +233,14 @@ export default {
230 233
     },
231 234
     getDryWeightDetail(id) {
232 235
       var patientid = this.$route.query.patientid;
233
-      this.$router.push("/dryweight?id=" + id + "&patientid=" + patientid);
236
+      this.$router.push(
237
+        "/dryweight?id=" +
238
+          id +
239
+          "&patientid=" +
240
+          patientid +
241
+          "&active=" +
242
+          this.active
243
+      );
234 244
     },
235 245
     getPatientDetail(patientid) {
236 246
       getPatientDetail(patientid).then(response => {

+ 16 - 2
src/pages/doctorAdvice/index.vue Vedi File

@@ -18,9 +18,12 @@
18 18
         <doctor-management v-if="active == 0"></doctor-management>
19 19
         <long-dialysis v-if="active == 1"></long-dialysis>
20 20
         <dialysis-record v-if="active == 2"></dialysis-record>
21
-        <dry-weight v-if="active == 3"></dry-weight>
21
+        <dry-weight v-if="active == 3" :active="active"></dry-weight>
22 22
         <inspection v-if="active == 4"></inspection>
23
-        <course-management v-if="active == 5"></course-management>
23
+        <course-management
24
+          v-if="active == 5"
25
+          :active="active"
26
+        ></course-management>
24 27
         <rescue-record v-if="active == 6"></rescue-record>
25 28
         <scheduling v-if="active == 7"></scheduling>
26 29
         <education v-if="active == 8"></education>
@@ -408,6 +411,9 @@ export default {
408 411
     }
409 412
   },
410 413
   created() {
414
+    if (this.$route.query.active) {
415
+      this.active = parseInt(this.$route.query.active);
416
+    }
411 417
     var patientid = this.$route.query.patientid;
412 418
     console.log("patientid", patientid);
413 419
     this.patient_id = patientid;
@@ -481,5 +487,13 @@ export default {
481 487
     display: flex;
482 488
     align-items: center;
483 489
   }
490
+  .van-tabs__line {
491
+    background: #5b98ff;
492
+  }
493
+  .van-tabs__nav {
494
+    > div:nth-of-type(2) {
495
+      flex-basis: 28% !important;
496
+    }
497
+  }
484 498
 }
485 499
 </style>