Browse Source

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

XMLWAN 4 years ago
parent
commit
c5f2ef0fa7

+ 10 - 1
src/pages/main/DetailsPage.vue View File

@@ -114,6 +114,9 @@ export default {
114 114
     this.GetPatientInfoWithDiseases(this.patient_id);
115 115
   },
116 116
   mounted() {
117
+    if(this.$route.query.active1){
118
+      this.index = parseInt(this.$route.query.active1)
119
+    }
117 120
     const that = this;
118 121
     window.onresize = () => {
119 122
       return (() => {
@@ -165,6 +168,11 @@ export default {
165 168
       this.$router.push("/mypatients/" + patient_id);
166 169
     }
167 170
   },
171
+  beforeRouteUpdate(to, from, next) {
172
+    console.log(1111111111111111111111111111)
173
+    console.log(to,from);    //345,123
174
+    next();
175
+  },
168 176
   watch: {
169 177
     clientHeight(val) {
170 178
       // 为了避免频繁触发resize函数导致页面卡顿,使用定时器
@@ -181,7 +189,8 @@ export default {
181 189
         }, 400);
182 190
       }
183 191
     }
184
-  }
192
+  },
193
+  
185 194
 };
186 195
 </script>
187 196
 

+ 174 - 0
src/pages/main/all/scheduling.vue View File

@@ -0,0 +1,174 @@
1
+<template>
2
+  <div class="page_allScheduling">
3
+    <van-sticky>
4
+      <div class="allSchedulingTitle">
5
+        <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
6
+        <span class="titleName">{{ name }}的排班信息</span>
7
+      </div>
8
+    </van-sticky>
9
+    <div class="dialysisBox">
10
+      <div class="dialysisBoxOne">
11
+        <p class="time">{{ getTime(schedulingDetail.schedule_date) }}</p>
12
+        <div class="orderContent">
13
+          <p>班次:{{ schedulingDetail.schedule_type }}</p>
14
+          <p>分区:{{ schedulingDetail.name }}</p>
15
+          <p>机号:{{ schedulingDetail.number }}</p>
16
+          <p>治疗模式:{{ schedulingDetail.mode_id }}</p>
17
+        </div>
18
+      </div>
19
+    </div>
20
+  </div>
21
+</template>
22
+<script>
23
+import { getSchedulingDetail } from "@/api/patient/patient";
24
+import { uParseTime } from "@/utils/tools";
25
+import { setRem, setHeight } from "@/libs/functionRem";
26
+import "../../../styles/resetStyle.scss";
27
+export default {
28
+  data() {
29
+    return {
30
+      name: "",
31
+      schedulingDetail: {},
32
+      patientid: 0,
33
+      active: 0
34
+    };
35
+  },
36
+  methods: {
37
+    getSchedulingDetail(id) {
38
+      getSchedulingDetail(id).then(response => {
39
+        if (response.data.state === 1) {
40
+          var schedulingDetail = response.data.data.schedulingDetail;
41
+          if (schedulingDetail.mode_id == 1) {
42
+            schedulingDetail.mode_id = "HD";
43
+          }
44
+          if (schedulingDetail.mode_id == 2) {
45
+            schedulingDetail.mode_id = "HDF";
46
+          }
47
+          if (schedulingDetail.mode_id == 3) {
48
+            schedulingDetail.mode_id = "HD+HP";
49
+          }
50
+          if (schedulingDetail.mode_id == 4) {
51
+            schedulingDetail.mode_id = "HP";
52
+          }
53
+          if (schedulingDetail.mode_id == 5) {
54
+            schedulingDetail.mode_id = "HF";
55
+          }
56
+          if (schedulingDetail.mode_id == 6) {
57
+            schedulingDetail.mode_id = "SCUF";
58
+          }
59
+          if (schedulingDetail.mode_id == 7) {
60
+            schedulingDetail.mode_id = "IUF";
61
+          }
62
+          if (schedulingDetail.mode_id == 8) {
63
+            schedulingDetail.mode_id = "HFHD";
64
+          }
65
+          if (schedulingDetail.mode_id == 9) {
66
+            schedulingDetail.mode_id = "HFHD+HP";
67
+          }
68
+          if (schedulingDetail.mode_id == 10) {
69
+            schedulingDetail.mode_id = "PHF";
70
+          }
71
+          if (schedulingDetail.mode_id == 11) {
72
+            schedulingDetail.mode_id = "HFR";
73
+          }
74
+          if (schedulingDetail.mode_id == 12) {
75
+            schedulingDetail.mode_id = "HDF+HP";
76
+          }
77
+          if (schedulingDetail.mode_id == 13) {
78
+            schedulingDetail.mode_id = "CRRT";
79
+          }
80
+          if (schedulingDetail.mode_id == 14) {
81
+            schedulingDetail.mode_id = "腹水回输";
82
+          }
83
+          if (schedulingDetail.schedule_type == 1) {
84
+            schedulingDetail.schedule_type = "上午";
85
+          }
86
+          if (schedulingDetail.schedule_type == 2) {
87
+            schedulingDetail.schedule_type = "中午";
88
+          }
89
+          if (schedulingDetail.schedule_type == 3) {
90
+            schedulingDetail.schedule_type = "下午";
91
+          }
92
+          this.schedulingDetail = schedulingDetail;
93
+          console.log("排班详情", schedulingDetail);
94
+          var patient = response.data.data.patient;
95
+          this.name = patient.name;
96
+          console.log("patient", patient);
97
+        }
98
+      });
99
+    },
100
+    getTime(time) {
101
+      // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
102
+      return uParseTime(time, "{y}-{m}-{d}");
103
+    },
104
+    toReturn() {
105
+      this.$router.push(
106
+        "/details?patient_id=" + 1064 + "&date=" + 1590508800 + "&patient_name=" + "黄晓" + "&active1=" + 1 + "&active2=" + 2
107
+      );
108
+    }
109
+  },
110
+  created() {
111
+    this.active = parseInt(this.$route.query.active);
112
+    setRem();
113
+    setHeight();
114
+    var id = this.$route.query.id;
115
+    var patientid = this.$route.query.patientid;
116
+    this.patientid = patientid;
117
+    this.getSchedulingDetail(id);
118
+  },
119
+};
120
+</script>
121
+<style lang="scss" scoped>
122
+.page_allScheduling {
123
+  height: 100%;
124
+  overflow-y: auto;
125
+  .allSchedulingTitle {
126
+    background: #fff;
127
+    padding: 0 1.125rem;
128
+    height: 3.125rem;
129
+    display: flex;
130
+    align-items: center;
131
+  }
132
+  .jiantou {
133
+    font-size: 1.5rem;
134
+    font-weight: 600;
135
+    margin-right: 5.5rem;
136
+  }
137
+  .titleName {
138
+    font-size: 1.125rem;
139
+    font-weight: 600;
140
+  }
141
+  .dialysisBox {
142
+    padding: 0 1.125rem;
143
+    margin-bottom: 3.125rem;
144
+    >div:last-child{
145
+      border: none;
146
+    }
147
+  }
148
+  
149
+  .dialysisBoxOne {
150
+    // box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);
151
+    border-bottom: 1px solid #e5e5e5;
152
+    padding-bottom: 1.25rem;
153
+    .time {
154
+      font-size: 1.125rem;
155
+      margin-top: 0.625rem;
156
+      font-weight: bold;
157
+    }
158
+  }
159
+  .orderContent {
160
+    font-size: 0.875rem;
161
+    color: rgba(49, 50, 52, 1);
162
+    margin-top: 0.625rem;
163
+    display: flex;
164
+    flex-wrap: wrap;
165
+    p {
166
+      line-height: 1.5rem;
167
+      width: 50%;
168
+    }
169
+  }
170
+}
171
+::-webkit-scrollbar {
172
+  width: 0;
173
+}
174
+</style>

+ 5 - 0
src/pages/main/dialysis/DialysisTab.vue View File

@@ -67,6 +67,11 @@ export default {
67 67
     ClickTab: function(tabIndex) {
68 68
       this.index = tabIndex;
69 69
     }
70
+  },
71
+  mounted(){
72
+    if(this.$route.query.active2){
73
+      this.index = parseInt(this.$route.query.active2)
74
+    }
70 75
   }
71 76
 };
72 77
 </script>

+ 1 - 1
src/pages/main/dialysis/SchedulTable.vue View File

@@ -599,7 +599,7 @@ export default {
599 599
     toEditSchduling(id) {
600 600
       var patientid = this.$route.query.patientid;
601 601
       this.$router.push(
602
-        "/editScheduling?id=" +
602
+        "/newScheduling?id=" +
603 603
           id +
604 604
           "&patientid=" +
605 605
           patientid +

+ 5 - 0
src/router/index.js View File

@@ -455,6 +455,11 @@ export default new Router({
455 455
       path: '/modifypsw',
456 456
       name: 'modifyPassword',
457 457
       component: () => import('@/pages/my/modifyPassword')
458
+    },
459
+    {
460
+      path: '/newScheduling',
461
+      name: 'newScheduling',
462
+      component: () => import('@/pages/main/all/scheduling')
458 463
     }
459 464
   ]
460 465
 })