소스 검색

添加医嘱提醒功能

csx 5 년 전
부모
커밋
620c300653

+ 1 - 1
config/prod.env.js 파일 보기

@@ -1,6 +1,6 @@
1 1
 'use strict'
2 2
 module.exports = {
3 3
   NODE_ENV: '"production"',
4
-  BASE_API: '"http://api.xt.test.sgjyun.com"'
4
+  BASE_API: '"http://api.xt.kuyicloud.com"'
5 5
   // '"http://api.xt.kuyicloud.com"', //'"http://api.xt.kuyicloud.com"','"http://api.xt.test.sgjyun.com"'
6 6
 }

+ 21 - 2
src/pages/layout/SideBar.vue 파일 보기

@@ -4,7 +4,8 @@
4 4
         <div class="head"><img :src="$store.getters.user.org.org_logo" alt=""></div>
5 5
         <ul class="sidebar">
6 6
             <li :class="active_index == 0 ? 'active' : ''">
7
-                <router-link to="/main"><span class="iconfont">&#xe6e6;</span><p>记录</p></router-link>
7
+                <router-link to="/main"> <span class="iconfont">&#xe6e6;</span><p>记录</p></router-link>
8
+              <span class="redpoint" v-if="total_read_dot">{{total_read_dot > 99?total_read_dot+'+':total_read_dot}}</span>
8 9
             </li>
9 10
              <li :class="active_index == 1 ? 'active' : ''">
10 11
                 <router-link to="/monitoring"><span class="iconfont">&#xe6f5;</span><p>监控</p></router-link>
@@ -14,7 +15,7 @@
14 15
             </li>
15 16
              <li :class="active_index == 3 ? 'active' : ''">
16 17
                 <router-link to="/my"><span class="iconfont">&#xe715;</span><p>我的</p></router-link>
17
-            </li> 
18
+            </li>
18 19
         </ul>
19 20
        </div>
20 21
     </div>
@@ -27,12 +28,30 @@ export default {
27 28
     active_index: {
28 29
       type: Number,
29 30
       default: 0
31
+    },
32
+    total_read_dot:{
33
+      type: Number,
34
+      default: 0
30 35
     }
31 36
   }
32 37
 };
33 38
 </script>
34 39
 
35 40
 <style style="stylesheet/scss" lang="scss" scoped>
41
+  .redpoint{
42
+  display:inline-block;
43
+  height:16px;
44
+  width:16px;
45
+  line-height:16px;
46
+  text-align:center;
47
+  font-size:0.1em;
48
+  border-radius:16px;
49
+  color:#fff;
50
+  background:red;
51
+  position: relative;
52
+  top: -8px;
53
+  right: 8px;
54
+  }
36 55
 .sideColumn {
37 56
   float: left;
38 57
   width: 1.58rem;

+ 11 - 0
src/pages/main/DialysisArea.vue 파일 보기

@@ -85,6 +85,7 @@ export default {
85 85
   },
86 86
   data() {
87 87
     return {
88
+      timer:null,
88 89
       selected_date: this.$store.getters.app.dialysis_area.schedule_date, //new Date(),
89 90
       schedual_types: [
90 91
         { value: 0, text: "全部班", select: true },
@@ -192,6 +193,15 @@ export default {
192 193
   created() {
193 194
     this.requestDialysisScheduals();
194 195
   },
196
+  mounted(){
197
+  this.timer =   window.setInterval(() => {
198
+      setTimeout(this.requestDialysisScheduals(), 0)
199
+    }, 30000)
200
+  },
201
+  beforeDestroy() {
202
+    clearInterval(this.timer);
203
+    this.timer = null;
204
+  },
195 205
   methods: {
196 206
     handletimeType: function(index) {
197 207
       this.sch_type_options_visible = false;
@@ -329,6 +339,7 @@ export default {
329 339
     display: inline-block;
330 340
   }
331 341
 }
342
+
332 343
 </style>
333 344
 
334 345
 <style>

+ 306 - 247
src/pages/main/PatientBox.vue 파일 보기

@@ -1,21 +1,28 @@
1 1
 <template>
2 2
   <div>
3
-    <div class="patient" :class="borderColor(patient)" v-for="(patient, index) in patients" :key="index" @click="detailAction(patient)">
3
+    <div class="patient" :class="borderColor(patient)" v-for="(patient, index) in patients" :key="index"
4
+         @click="detailAction(patient)">
4 5
       <!-- <router-link :to="{path:'/details',  query: {patient_id: patient.patient_id, date: patient.schedule_date}}"> -->
5
-        <div class="kehu">
6
-          <div class="tx">
7
-            <img :src="patient.patient.avatar.length > 0 ? patient.patient.avatar : '../../assets/product/test.jpg'" alt="">
8
-            <div class="right">
9
-               <h3 class="name">{{patient.patient.name}}<span class="yc" v-show="isAbnormal(patient)">异常</span></h3>
10
-               <span class="num">{{ genderText(patient) }} | {{ age(patient) }}岁</span>
11
-               <!-- 性别、年龄 -->
12
-            </div>
13
-          </div>
14
-          <div class="online" v-show="computeState(patient) != 4" >
15
-            <p :class="stateColor(patient)">{{stateText(patient)}}</p>
16
-            <!-- <span class="time">剩余时间 : 90:08</span>     -->
6
+      <div class="kehu">
7
+
8
+        <div class="tx">
9
+            <img :src="patient.patient.avatar.length > 0 ? patient.patient.avatar : '../../assets/product/test.jpg'"
10
+                 alt="">
11
+            <span class="redpoint" v-if="getStatus(patient)">{{getUnReadNum(patient) > 99?getUnReadNum(patient)+"+":getUnReadNum(patient)}}
12
+           </span>
13
+          <div class="right">
14
+            <h3 class="name">{{patient.patient.name}}<span class="yc" v-show="isAbnormal(patient)">异常</span></h3>
15
+            <span class="num">{{ genderText(patient) }} | {{ age(patient) }}岁</span>
16
+            <!-- 性别、年龄 -->
17
+
17 18
           </div>
18 19
         </div>
20
+        <div class="online" v-show="computeState(patient) != 4">
21
+          <p :class="stateColor(patient)">{{stateText(patient)}}</p>
22
+          <!-- <span class="time">剩余时间 : 90:08</span>     -->
23
+        </div>
24
+
25
+      </div>
19 26
       <!-- </router-link> -->
20 27
       <div class="function" :class="functionColor(patient)">
21 28
         <ul>
@@ -29,266 +36,318 @@
29 36
 </template>
30 37
 
31 38
 <script>
32
-import { parseTime } from "@/utils";
33
-import { jsGetAge } from '@/utils/tools'
39
+  import {parseTime} from '@/utils'
40
+  import {jsGetAge} from '@/utils/tools'
34 41
 
35
-export default {
36
-  name: "PatientBox",
37
-  props: {
38
-    patients: Array
39
-  },
40
-  data() {
41
-    return {};
42
-  },
43
-  methods: {
44
-    stateColor: function(schedual) {
45
-      var state = this.computeState(schedual);
46
-      if (state == 1) {
47
-        return "blue";
48
-      } else if (state == 2) {
49
-        return "gray";
50
-      } else if (state == 3) {
51
-        return "red";
52
-      } else {
53
-        return "blue";
54
-      }
55
-    },
56
-    functionColor: function(schedual) {
57
-      var state = this.computeState(schedual);
58
-      if (state == 1 || state == 3) {
59
-        return "blue";
60
-      } else if (state == 2) {
61
-        return "gray";
62
-      } else {
63
-        return "blue";
64
-      }
65
-    },
66
-    borderColor: function(schedual) {
67
-      var yc = this.isAbnormal(schedual);
68
-      if (yc == true) {
69
-        return "red";
70
-      } else {
71
-        return "gray";
72
-      }
42
+  export default {
43
+    name: 'PatientBox',
44
+    props: {
45
+      patients: Array
73 46
     },
74
-    stateText: function(schedual) {
75
-      var state = this.computeState(schedual);
76
-      if (state == 1) {
77
-        return "已上机";
78
-      } else if (state == 2) {
79
-        return "已下机";
80
-      } else if (state == 3) {
81
-        return "监测中";
82
-      } else {
83
-        // return schedual.patient.gender == 1 ? "男" : "女"
84
-        return "未上机";
85
-      }
86
-    },
87
-    computeState: function(schedual) {
88
-      if (schedual.dialysis_order == null) {
89
-        // 未上机
90
-        return 4;
91
-      } else if (schedual.dialysis_order.stage == 2) {
92
-        // 已下机
93
-        return 2;
94
-      } else if (
95
-        schedual.dialysis_order.stage == 1 &&
96
-        schedual.monitoring_records != null &&
97
-        schedual.monitoring_records.length > 1
98
-      ) {
99
-        // 监测中
100
-        return 3;
101
-      } else {
102
-        return 1;
103
-      }
47
+    data () {
48
+      return {}
104 49
     },
50
+    methods: {
51
+      getUnReadNum: function (schedual) {
52
+        if (schedual.doctor_advice != null) {
53
+          let doctorAdvice = []
54
+          for (let i = 0; i < schedual.doctor_advice.length; i++) {
55
+            if (schedual.doctor_advice[i].execution_state == 2) {
56
+              doctorAdvice.push(schedual.doctor_advice[i])
57
+            }
58
+          }
59
+          const sorted = this.groupBy(doctorAdvice, function (item) {
60
+            return [item.groupno]
61
+          })
62
+          return sorted.length
63
+        }
64
+      },
65
+      getStatus: function (schedual) {
66
+        var isShowDot = false
67
+        if (schedual.doctor_advice != null) {
68
+          for (let i = 0; i < schedual.doctor_advice.length; i++) {
69
+            if (schedual.doctor_advice[i].execution_state == 2) {
70
+              isShowDot = true
71
+            }
72
+          }
73
+          return isShowDot
105 74
 
106
-    orderState: function(schedual) {
107
-      if (schedual.dialysis_order == null) {
108
-        // 未上机
109
-        return 4;
110
-      } else if (schedual.dialysis_order.stage == 2) {
111
-        // 已下机
112
-        return 2;
113
-      } else if (
114
-        schedual.dialysis_order.stage == 1 &&
115
-        schedual.monitoring_records != null &&
116
-        schedual.monitoring_records.length > 1
117
-      ) {
118
-        // 监测中
119
-        return 3;
120
-      } else {
121
-        return 1;
122
-      }
123
-    },
124
-    isAbnormal: function(schedual) {
125
-      return false; // schedual.yc;
126
-    },
127
-    timeTypeText: function(schedual) {
128
-      if (schedual.schedule_type == 1) {
129
-        return "上午";
130
-      } else if (schedual.schedule_type == 2) {
131
-        return "下午";
132
-      } else {
133
-        return "晚上";
134
-      }
135
-    },
136
-    genderText: function(schedual) {
137
-      if (schedual.patient.gender == 0) {
138
-        return "未知";
139
-      } else if (schedual.patient.gender == 1) {
140
-        return "男";
141
-      } else {
142
-        return "女";
143
-      }
144
-    },
145
-    age: function(schedual) {
146
-      if(schedual.patient.age == 0){
75
+        } else {
76
+          return false
77
+        }
78
+      },
79
+      stateColor: function (schedual) {
80
+        var state = this.computeState(schedual)
81
+        if (state == 1) {
82
+          return 'blue'
83
+        } else if (state == 2) {
84
+          return 'gray'
85
+        } else if (state == 3) {
86
+          return 'red'
87
+        } else {
88
+          return 'blue'
89
+        }
90
+      },
91
+      functionColor: function (schedual) {
92
+        var state = this.computeState(schedual)
93
+        if (state == 1 || state == 3) {
94
+          return 'blue'
95
+        } else if (state == 2) {
96
+          return 'gray'
97
+        } else {
98
+          return 'blue'
99
+        }
100
+      },
101
+      borderColor: function (schedual) {
102
+        var yc = this.isAbnormal(schedual)
103
+        if (yc == true) {
104
+          return 'red'
105
+        } else {
106
+          return 'gray'
107
+        }
108
+      },
109
+      stateText: function (schedual) {
110
+        var state = this.computeState(schedual)
111
+        if (state == 1) {
112
+          return '已上机'
113
+        } else if (state == 2) {
114
+          return '已下机'
115
+        } else if (state == 3) {
116
+          return '监测中'
117
+        } else {
118
+          // return schedual.patient.gender == 1 ? "男" : "女"
119
+          return '未上机'
120
+        }
121
+      },
122
+      computeState: function (schedual) {
123
+        if (schedual.dialysis_order == null) {
124
+          // 未上机
125
+          return 4
126
+        } else if (schedual.dialysis_order.stage == 2) {
127
+          // 已下机
128
+          return 2
129
+        } else if (
130
+          schedual.dialysis_order.stage == 1 &&
131
+          schedual.monitoring_records != null &&
132
+          schedual.monitoring_records.length > 1
133
+        ) {
134
+          // 监测中
135
+          return 3
136
+        } else {
137
+          return 1
138
+        }
139
+      },
147 140
 
148
-        return jsGetAge(parseTime(schedual.patient.birthday, '{y}-{m}-{d}'), '-')
141
+      orderState: function (schedual) {
142
+        if (schedual.dialysis_order == null) {
143
+          // 未上机
144
+          return 4
145
+        } else if (schedual.dialysis_order.stage == 2) {
146
+          // 已下机
147
+          return 2
148
+        } else if (
149
+          schedual.dialysis_order.stage == 1 &&
150
+          schedual.monitoring_records != null &&
151
+          schedual.monitoring_records.length > 1
152
+        ) {
153
+          // 监测中
154
+          return 3
155
+        } else {
156
+          return 1
157
+        }
158
+      },
159
+      isAbnormal: function (schedual) {
160
+        return false // schedual.yc;
161
+      },
162
+      timeTypeText: function (schedual) {
163
+        if (schedual.schedule_type == 1) {
164
+          return '上午'
165
+        } else if (schedual.schedule_type == 2) {
166
+          return '下午'
167
+        } else {
168
+          return '晚上'
169
+        }
170
+      },
171
+      genderText: function (schedual) {
172
+        if (schedual.patient.gender == 0) {
173
+          return '未知'
174
+        } else if (schedual.patient.gender == 1) {
175
+          return '男'
176
+        } else {
177
+          return '女'
178
+        }
179
+      },
180
+      age: function (schedual) {
181
+        if (schedual.patient.age == 0) {
149 182
 
150
-      }else{
183
+          return jsGetAge(parseTime(schedual.patient.birthday, '{y}-{m}-{d}'), '-')
151 184
 
152
-        return schedual.patient.age
153
-      }
185
+        } else {
154 186
 
155
-      // var now = new Date();
156
-      // var nowYear = parseTime(now, "{y}");
157
-      // var birthdayYear = parseTime(schedual.patient.birthday, "{y}");
158
-      // // console.log(nowYear)
159
-      // // console.log(birthdayYear)
160
-      // return nowYear - birthdayYear;
161
-    },
162
-    detailAction: function(schedual) {
163
-      var patient_id = schedual.patient_id;
164
-      var date = schedual.schedule_date;
165
-      this.$router.push({
166
-        path: "/details",
167
-        query: {
168
-          patient_id: patient_id,
169
-          date: date,
170
-          patient_name: schedual.patient.name
187
+          return schedual.patient.age
171 188
         }
172
-      });
189
+
190
+        // var now = new Date();
191
+        // var nowYear = parseTime(now, "{y}");
192
+        // var birthdayYear = parseTime(schedual.patient.birthday, "{y}");
193
+        // // console.log(nowYear)
194
+        // // console.log(birthdayYear)
195
+        // return nowYear - birthdayYear;
196
+      }, groupBy (array, f) {
197
+        const groups = {}
198
+        array.forEach(function (o) {
199
+          const group = JSON.stringify(f(o))
200
+          groups[group] = groups[group] || []
201
+          groups[group].push(o)
202
+        })
203
+        return Object.keys(groups).map(function (group) {
204
+          return groups[group]
205
+        })
206
+      },
207
+      detailAction: function (schedual) {
208
+        var patient_id = schedual.patient_id
209
+        var date = schedual.schedule_date
210
+        this.$router.push({
211
+          path: '/details',
212
+          query: {
213
+            patient_id: patient_id,
214
+            date: date,
215
+            patient_name: schedual.patient.name
216
+          }
217
+        })
218
+      }
173 219
     }
174 220
   }
175
-};
176 221
 </script>
177 222
 
178 223
 <style style="stylesheet/scss" lang="scss" scoped>
179
-.patient {
224
+  .patient {
180 225
   border: 1px #e5e5ee solid;
181 226
   padding: 0.33rem 0;
182 227
   width: 47%;
183 228
   margin: 0 3% 0.5rem 0;
184 229
   float: left;
185 230
   .function {
186
-    padding: 0.3rem 0.32rem 0 0.32rem;
187
-    color: #7b8a97;
188
-    ul {
189
-      @include display-flex;
190
-      @include align-items-center;
191
-      @include text-align;
192
-      @include justify-content-between;
193
-      li {
194
-        font-size: 0.3rem;
195
-        @include display-flex;
196
-        @include align-items-center;
197
-        .iconfont {
198
-          margin: 0 0.1rem 0 0;
199
-          font-size: 0.4rem;
200
-        }
201
-      }
202
-    }
231
+  padding: 0.3rem 0.32rem 0 0.32rem;
232
+  color: #7b8a97;
233
+  ul {
234
+  @include display-flex;
235
+  @include align-items-center;
236
+  @include text-align;
237
+  @include justify-content-between;
238
+  li {
239
+  font-size: 0.3rem;
240
+  @include display-flex;
241
+  @include align-items-center;
242
+  .iconfont {
243
+  margin: 0 0.1rem 0 0;
244
+  font-size: 0.4rem;
245
+  }
246
+  }
247
+  }
203 248
   }
204 249
   .blue {
205
-    color: $main-color;
206
-    .iconfont {
207
-      color: $main-color;
208
-    }
250
+  color: $main-color;
251
+  .iconfont {
252
+  color: $main-color;
253
+  }
209 254
   }
210 255
   .kehu {
211
-    @include display-flex;
212
-    @include align-items-center;
213
-    @include text-align;
214
-    @include justify-content-between;
215
-    border-bottom: 1px #e5e5e5 solid;
216
-    padding: 0 0 0.3rem 0.32rem;
217
-    .tx {
218
-      @include display-flex;
219
-      @include align-items-center;
220
-      img {
221
-        width: 1rem;
222
-        height: 1rem;
223
-        border-radius: 50%;
224
-        float: left;
225
-        margin: 0 0.3rem 0 0;
226
-      }
227
-      .right {
228
-        float: left;
229
-        text-align: left;
230
-        .name {
231
-          font-size: 0.34rem;
232
-          color: $title-color;
233
-          font-weight: 600;
234
-          margin-bottom: 0.1rem;
235
-          .yc {
236
-            background: #ff7979;
237
-            color: #fff;
238
-            height: 0.38rem;
239
-            line-height: 0.38rem;
240
-            font-size: 0.24rem;
241
-            width: 0.74rem;
242
-            border-radius: 4px;
243
-            display: inline-block;
244
-            text-align: center;
245
-            margin-left: 0.13rem;
246
-          }
247
-        }
248
-        .num {
249
-          font-size: 0.3rem;
250
-        }
251
-      }
252
-    }
256
+  @include display-flex;
257
+  @include align-items-center;
258
+  @include text-align;
259
+  @include justify-content-between;
260
+  border-bottom: 1px #e5e5e5 solid;
261
+  padding: 0 0 0.3rem 0.32rem;
262
+  .tx {
263
+  @include display-flex;
264
+  @include align-items-center;
265
+  img {
266
+  width: 1rem;
267
+  height: 1rem;
268
+  border-radius: 50%;
269
+  float: left;
270
+  margin: 0 0.3rem 0 0;
271
+  }
272
+  .right {
273
+  float: left;
274
+  text-align: left;
275
+  .name {
276
+  font-size: 0.34rem;
277
+  color: $title-color;
278
+  font-weight: 600;
279
+  margin-bottom: 0.1rem;
280
+  .yc {
281
+  background: #ff7979;
282
+  color: #fff;
283
+  height: 0.38rem;
284
+  line-height: 0.38rem;
285
+  font-size: 0.24rem;
286
+  width: 0.74rem;
287
+  border-radius: 4px;
288
+  display: inline-block;
289
+  text-align: center;
290
+  margin-left: 0.13rem;
291
+  }
292
+  }
293
+  .num {
294
+  font-size: 0.3rem;
295
+  }
296
+  }
297
+  }
253 298
 
254
-    .online {
255
-      text-align: center;
256
-      width: 50%;
257
-      border-left: 1px #e5e5e5 solid;
258
-      p {
259
-        background: #c6cdd2;
260
-        color: #fff;
261
-        width: 1.35rem;
262
-        height: 0.56rem;
263
-        line-height: 0.56rem;
264
-        border-radius: 4px;
265
-        margin: 0 auto;
266
-        font-size: 0.32rem;
267
-      }
268
-      .blue {
269
-        background: $main-color;
270
-      }
271
-      .red {
272
-        background: #f18f68;
273
-      }
274
-      .green {
275
-        background: #5bd18b;
276
-      }
277
-      .gray {
278
-        background: #a8b3ba;
279
-      }
280
-      .lightGray {
281
-        background: #c6cdd2;
282
-      }
283
-      .time {
284
-        font-size: 0.26rem;
285
-        color: #34495e;
286
-      }
287
-    }
299
+  .online {
300
+  text-align: center;
301
+  width: 50%;
302
+  border-left: 1px #e5e5e5 solid;
303
+  p {
304
+  background: #c6cdd2;
305
+  color: #fff;
306
+  width: 1.35rem;
307
+  height: 0.56rem;
308
+  line-height: 0.56rem;
309
+  border-radius: 4px;
310
+  margin: 0 auto;
311
+  font-size: 0.32rem;
312
+  }
313
+  .blue {
314
+  background: $main-color;
288 315
   }
289
-}
290
-.red {
316
+  .red {
317
+  background: #f18f68;
318
+  }
319
+  .green {
320
+  background: #5bd18b;
321
+  }
322
+  .gray {
323
+  background: #a8b3ba;
324
+  }
325
+  .lightGray {
326
+  background: #c6cdd2;
327
+  }
328
+  .time {
329
+  font-size: 0.26rem;
330
+  color: #34495e;
331
+  }
332
+  }
333
+  }
334
+  }
335
+  .red {
291 336
   border: 1px #ff7979 solid;
292
-}
337
+  }
338
+  .redpoint{
339
+  display:inline-block;
340
+  height:16px;
341
+  width:16px;
342
+  line-height:16px;
343
+  text-align:center;
344
+  font-size:0.1em;
345
+  border-radius:16px;
346
+  color:#fff;
347
+  background:red;
348
+  position: relative;
349
+  top: -8px;
350
+  right: 8px;
351
+  }
293 352
 </style>
294 353
 

+ 102 - 71
src/pages/main/RecordPage.vue 파일 보기

@@ -1,5 +1,5 @@
1 1
 <template>
2
-<div>
2
+  <div>
3 3
     <van-row class="top_row">
4 4
       <van-col :span="9">
5 5
         <div>
@@ -8,9 +8,16 @@
8 8
       </van-col>
9 9
       <van-col :span="6">
10 10
         <div class="department">
11
-            <ul>
12
-                <li v-for="(item,i) in ['候诊室','透析区']" :key="i" :class="index == i? 'active':'' " @click="ClickTab(i)" >{{item}}</li> 
13
-            </ul>
11
+          <ul>
12
+            <li :class="index == 0? 'active':'' " @click="ClickTab(0)">
13
+              {{'候诊区'}}
14
+              <span class="redpoint" v-if="un_read_wait_num">{{un_read_wait_num > 99 ? un_read_wait_num+'+':un_read_wait_num}}</span>
15
+            </li>
16
+            <li :class="index == 1? 'active':'' " @click="ClickTab(1)">
17
+              {{'透析区'}}
18
+              <span class="redpoint" v-if="un_read_dialysis_num">{{un_read_dialysis_num > 99 ? un_read_dialysis_num+'+':un_read_dialysis_num}}</span>
19
+            </li>
20
+          </ul>
14 21
         </div>
15 22
       </van-col>
16 23
       <van-col :span="9">
@@ -20,7 +27,8 @@
20 27
         <div class="search">
21 28
           <van-field v-model="search_input" ref="search_field" placeholder="透析号/姓名" class="field">
22 29
             <i class="iconfont" slot="left-icon">&#xe741;</i>
23
-            <van-button slot="button" size="small" type="info" style="border: none;" @click="searchWithKeyword">搜索</van-button>
30
+            <van-button slot="button" size="small" type="info" style="border: none;" @click="searchWithKeyword">搜索
31
+            </van-button>
24 32
           </van-field>
25 33
         </div>
26 34
       </van-col>
@@ -32,7 +40,7 @@
32 40
         </div>
33 41
         <div class="department">
34 42
             <ul>
35
-                <li v-for="(item,i) in ['候诊室','透析区']" :key="i" :class="index == i? 'active':'' " @click="ClickTab(i)" >{{item}}</li> 
43
+                <li v-for="(item,i) in ['候诊室','透析区']" :key="i" :class="index == i? 'active':'' " @click="ClickTab(i)" >{{item}}</li>
36 44
             </ul>
37 45
         </div>
38 46
         <div class="search">
@@ -44,98 +52,121 @@
44 52
         <van-button size="small" type="info">临时排班</van-button>
45 53
     </div> -->
46 54
     <div class="area">
47
-       <waiting-area v-show="index==0" title="候诊区" :search_keyword="search_keyword"></waiting-area>
48
-       <dialysis-area v-show="index==1" title="透析区" :search_keyword="search_keyword" @clear_search_keyword="clearKeyword"></dialysis-area>
55
+      <waiting-area v-show="index==0" title="候诊区" :search_keyword="search_keyword"></waiting-area>
56
+      <dialysis-area v-show="index==1" title="透析区" :search_keyword="search_keyword"
57
+                     @clear_search_keyword="clearKeyword"></dialysis-area>
49 58
     </div>
50
-    
51
-</div>  
59
+
60
+  </div>
52 61
 </template>
53 62
 
54 63
 
55 64
 <script>
56
-import DialysisArea from "./DialysisArea";
57
-import WaitingArea from "./WaitingArea";
58
-import { Popover } from "vux";
59
-export default {
60
-  name: "RecordPage",
61
-  data() {
62
-    return {
63
-      index: 1,
64
-      search_input: "",
65
-      search_keyword: ""
66
-      // yyList: [
67
-      //   {
68
-      //     value: "0",
69
-      //     name: "济南医院"
70
-      //   },
71
-      //   {
72
-      //     value: "1",
73
-      //     name: "血透中心"
74
-      //   }
75
-      // ]
76
-    };
77
-  },
78
-  components: {
79
-    DialysisArea,
80
-    WaitingArea,
81
-    Popover
82
-    // Group,
83
-    // Cell
84
-  },
85
-  methods: {
86
-    ClickTab: function(tabIndex) {
87
-      this.index = tabIndex;
65
+  import DialysisArea from './DialysisArea'
66
+  import WaitingArea from './WaitingArea'
67
+  import {Popover} from 'vux'
68
+  import {getDialysisScheduals, getWaitingScheduals} from '@/api/dialysis'
69
+  import {parseTime} from '@/utils/index'
70
+
71
+  export default {
72
+    name: 'RecordPage',
73
+    props: {
74
+      un_read_wait_num: {
75
+        type: Number,
76
+      },
77
+      un_read_dialysis_num: {
78
+        type: Number,
79
+      }
88 80
     },
89
-    searchWithKeyword: function() {
90
-      this.$refs.search_field.blur();
91
-      this.search_keyword = this.search_input;
81
+    data () {
82
+      return {
83
+        index: 1,
84
+        search_input: '',
85
+        search_keyword: '',
86
+        scheduals: [],
87
+        advice_groups:[],
88
+        unReadWaitNum:0,
89
+        unReadDialysisNum:0,
90
+
91
+      }
92
+    },
93
+    components: {
94
+      DialysisArea,
95
+      WaitingArea,
96
+      Popover
97
+      // Group,
98
+      // Cell
92 99
     },
93
-    clearKeyword: function() {
94
-      this.search_input = "";
95
-      this.search_keyword = "";
100
+
101
+    methods: {
102
+      ClickTab: function (tabIndex) {
103
+        this.index = tabIndex
104
+      },
105
+      searchWithKeyword: function () {
106
+        this.$refs.search_field.blur()
107
+        this.search_keyword = this.search_input
108
+      },
109
+      clearKeyword: function () {
110
+        this.search_input = ''
111
+        this.search_keyword = ''
112
+      },
96 113
     }
97 114
   }
98
-};
99 115
 </script>
100 116
 
101 117
 <style style="stylesheet/scss" lang="scss" scoped>
102
-.top_row {
118
+  .top_row {
103 119
   font-size: 0.3rem;
104 120
   padding: 0.3rem 0.3rem;
105 121
   border-bottom: 1px #e5e5e5 solid;
106 122
   display: flex;
107 123
   align-items: center;
108
-}
109
-.title {
124
+  }
125
+  .title {
110 126
   font-size: 0.34rem;
111 127
   font-weight: 600;
112 128
   color: $title-color;
113
-}
114
-.department {
129
+  }
130
+  .department {
115 131
   text-align: center;
116 132
   ul {
117
-    li {
118
-      float: left;
119
-      font-size: 0.36rem;
120
-      margin: 0 0.2rem;
121
-      height: 0.64rem;
122
-      line-height: 0.64rem;
123
-      padding: 0 0.3rem;
124
-      color: $title-color;
125
-      &.active {
126
-        background: $main-color;
127
-        color: #fff;
128
-        border-radius: 30px;
129
-      }
130
-    }
133
+  li {
134
+  float: left;
135
+  font-size: 0.36rem;
136
+  margin: 0 0.2rem;
137
+  height: 0.64rem;
138
+  line-height: 0.64rem;
139
+  padding: 0 0.3rem;
140
+  color: $title-color;
141
+  &.active {
142
+  background: $main-color;
143
+  color: #fff;
144
+  border-radius: 30px;
145
+  }
146
+  }
147
+  }
131 148
   }
132
-}
133 149
 
134
-.add_schedule_btn {
150
+  .add_schedule_btn {
135 151
   margin-left: 10px;
136 152
   float: right;
137 153
   background-color: #ff7978;
138 154
   border: none;
139
-}
155
+  }
156
+
157
+  .redpoint{
158
+  display:inline-block;
159
+  height:16px;
160
+  width:16px;
161
+  line-height:16px;
162
+  text-align:center;
163
+  font-size:0.1em;
164
+  border-radius:16px;
165
+  color:#fff;
166
+  background:red;
167
+  position: relative;
168
+  top: -8px;
169
+  right: 8px;
170
+  }
140 171
 </style>
141 172
 

+ 16 - 1
src/pages/main/WaitingArea.vue 파일 보기

@@ -16,7 +16,7 @@
16 16
           </div>
17 17
         </el-popover>
18 18
 
19
-         <li v-for="(item,i) in menuList" :class="select_index == i ? 'active' : ''" @click="menuTabClick(i)" 
19
+         <li v-for="(item,i) in menuList" :class="select_index == i ? 'active' : ''" @click="menuTabClick(i)"
20 20
         :key="i">{{ item.label + (item.count > 0 ? '(' + item.count + ')' : '') }}</li>
21 21
       </ul>
22 22
     </div>
@@ -127,6 +127,20 @@ export default {
127 127
   created() {
128 128
     this.requestScheduals();
129 129
   },
130
+  mounted(){
131
+    this.timer =   window.setInterval(() => {
132
+      setTimeout(this.requestScheduals(), 0)
133
+    }, 30000)
134
+
135
+
136
+  },
137
+  beforeDestroy() {
138
+    clearInterval(this.timer);
139
+    this.timer = null;
140
+    // this.$once('hook:beforeDestroy', () => {
141
+    //   clearInterval(this.timer);
142
+    // })
143
+  },
130 144
   methods: {
131 145
     menuTabClick: function(tabIndex) {
132 146
       this.select_index = tabIndex;
@@ -139,6 +153,7 @@ export default {
139 153
     },
140 154
 
141 155
     requestScheduals() {
156
+
142 157
       var date = parseTime(Date.parse(new Date()), "{y}-{m}-{d}");
143 158
       getWaitingScheduals({ date: date }).then(rs => {
144 159
         var resp = rs.data;

+ 193 - 70
src/pages/main/index.vue 파일 보기

@@ -1,84 +1,207 @@
1 1
 <template>
2
-<div class="mainBox">
3
-    <side-bar :active_index="0"></side-bar>
2
+
3
+  <div class="mainBox">
4
+    <div>
5
+    <side-bar :active_index="0" :total_read_dot="readNum"></side-bar>
4 6
     <div class="mainContent">
5
-      <record-page></record-page>
7
+      <record-page :un_read_wait_num="unReadWaitNum" :un_read_dialysis_num="unReadDialysisNum"></record-page>
8
+    </div>
6 9
     </div>
7
-</div>  
8
-</template>   
10
+
11
+  </div>
12
+</template>
9 13
 
10 14
 
11 15
 <script>
12
-import RecordPage from "./RecordPage";
13
-import SideBar from "@/pages/layout/SideBar"
14
-export default {
15
-  name: "Main",
16
-  components: {
17
-    RecordPage,
18
-    SideBar,
19
-  },
20
-  
21
-};
22
-</script>
16
+  import RecordPage from './RecordPage'
17
+  import SideBar from '@/pages/layout/SideBar'
18
+  import {getDialysisScheduals, getWaitingScheduals} from '@/api/dialysis'
19
+  import {parseTime} from '@/utils/index'
23 20
 
24
-<style style="stylesheet/scss" lang="scss"   scoped>
25
-html,
26
-body {
27
-  height: 100%;
28
-}
29
-.mainBox {
30
-  height: 100%;
31
-  font-size:0.3rem;
32
-  .sideColumn {
33
-    .column {
34
-      .head {
35
-        @include display-flex;
36
-        @include align-items-center;
37
-        @include flex-direction;
38
-        @include text-align;
39
-        @include justify-content-center;
40
-        margin: 0.5rem 0 0.5rem 0;  
41
-        img {
42
-          width: 100%;
43
-          height: 100%;
44
-          border-radius: 0.5rem;
45
-          width: 0.7rem;
46
-          height: 0.7rem;
47
-        }
21
+  export default {
22
+    name: 'Main',
23
+    data () {
24
+      return {
25
+        timer:null,
26
+        scheduals: [],
27
+        advice_groups: [],
28
+        unReadWaitNum: 0,
29
+        unReadDialysisNum: 0,
48 30
       }
49
-      .sidebar {
50
-        @include display-flex;
51
-        @include align-items-center;
52
-        @include flex-direction;
53
-        @include text-align;
54
-        padding: 0;
55
-        li {
56
-          padding:  0 0 0.8rem 0;
57
-          a {
58
-            color: #a8b3ba;
59
-            display: inline-block;
60
-            padding: 0;
61
-            margin: 0;
62
-            p {
63
-              font-size: 0.24rem;
64
-              margin-top: 0.2rem;
65
-            }
66
-            .iconfont {
67
-              font-size: 0.5rem;
68
-              display: inline-block;
31
+    },
32
+    components: {
33
+      RecordPage,
34
+      SideBar,
35
+    },
36
+    created () {
37
+      this.requestScheduals()
38
+      this.requestDialysisScheduals()
39
+
40
+    },
41
+    methods: {
42
+
43
+      requestScheduals () {
44
+        var date = parseTime(Date.parse(new Date()), '{y}-{m}-{d}')
45
+        getWaitingScheduals({date: date}).then(rs => {
46
+          var resp = rs.data
47
+          // console.log(resp);
48
+          if (resp.state == 1) {
49
+            var scheduals = resp.data.scheduals
50
+            this.scheduals = scheduals
51
+            console.log(this.scheduals)
52
+            let doctorAdvice = []
53
+            for (let i = 0; i < this.scheduals.length; i++) {
54
+              for (let y = 0; y < this.scheduals[i].doctor_advice.length; y++) {
55
+                if (this.scheduals[i].doctor_advice[y].execution_state == 2) {
56
+                  doctorAdvice.push(this.scheduals[i].doctor_advice[y])
57
+                }
58
+              }
69 59
             }
60
+
61
+            const sorted = this.groupBy(doctorAdvice, function (item) {
62
+              return [item.groupno]
63
+            })
64
+
65
+            this.unReadWaitNum = sorted.length
66
+
67
+          } else {
68
+            this.$toast({
69
+              message: resp.msg
70
+            })
70 71
           }
71
-          &.active {
72
-            a {
73
-              color: #409eff;
72
+        })
73
+      },
74
+      requestDialysisScheduals () {
75
+        var date = this.$store.getters.app.dialysis_area.schedule_date
76
+        var type = 0
77
+        getDialysisScheduals({type: type, date: parseTime(date, '{y}-{m}-{d}')})
78
+          .then(rs => {
79
+            var resp = rs.data
80
+            if (resp.state == 1) {
81
+              var scheduals = resp.data.scheduals
82
+              let doctorAdvice = []
83
+              for (let index = 0; index < scheduals.length; index++) {
84
+                const schedual = scheduals[index]
85
+                if (schedual.dialysis_order == null) {
86
+                  continue
87
+                }
88
+                for (let y = 0; y < schedual.doctor_advice.length; y++) {
89
+                  if (schedual.doctor_advice[y].execution_state == 2) {
90
+                    doctorAdvice.push(schedual.doctor_advice[y])
91
+                  }
92
+                }
93
+              }
94
+
95
+              const sorted = this.groupBy(doctorAdvice, function (item) {
96
+                return [item.groupno]
97
+              })
98
+
99
+              this.unReadDialysisNum = sorted.length
100
+
101
+            } else {
102
+              this.$toast({
103
+                message: resp.msg
104
+              })
74 105
             }
75
-          }
76
-        }
106
+          })
107
+          .catch(v => {
108
+          })
109
+      }, groupBy (array, f) {
110
+        const groups = {}
111
+        array.forEach(function (o) {
112
+          const group = JSON.stringify(f(o))
113
+          groups[group] = groups[group] || []
114
+          groups[group].push(o)
115
+        })
116
+        return Object.keys(groups).map(function (group) {
117
+          return groups[group]
118
+        })
119
+      },getData(){
120
+        console.log("111111")
121
+        this.requestScheduals()
122
+        this.requestDialysisScheduals()
77 123
       }
78
-    }
124
+
125
+    },
126
+    computed: {
127
+      readNum: function () {
128
+        return this.unReadWaitNum + this.unReadDialysisNum
129
+
130
+      }
131
+
132
+    }, mounted(){
133
+      this.timer =   window.setInterval(() => {
134
+        setTimeout(this.getData(), 0)
135
+      }, 30000)
136
+
137
+
138
+    },beforeDestroy() {
139
+      clearInterval(this.timer);
140
+      this.timer = null;
141
+    },
142
+
143
+  }
144
+</script>
145
+
146
+<style style="stylesheet/scss" lang="scss" scoped>
147
+  html,
148
+  body {
149
+  height: 100%;
150
+  }
151
+  .mainBox {
152
+  height: 100%;
153
+  font-size:0.3rem;
154
+  .sideColumn {
155
+  .column {
156
+  .head {
157
+  @include display-flex;
158
+  @include align-items-center;
159
+  @include flex-direction;
160
+  @include text-align;
161
+  @include justify-content-center;
162
+  margin: 0.5rem 0 0.5rem 0;
163
+  img {
164
+  width: 100%;
165
+  height: 100%;
166
+  border-radius: 0.5rem;
167
+  width: 0.7rem;
168
+  height: 0.7rem;
169
+  }
170
+  }
171
+  .sidebar {
172
+  @include display-flex;
173
+  @include align-items-center;
174
+  @include flex-direction;
175
+  @include text-align;
176
+  padding: 0;
177
+  li {
178
+  padding: 0 0 0.8rem 0;
179
+  a {
180
+  color: #a8b3ba;
181
+  display: inline-block;
182
+  padding: 0;
183
+  margin: 0;
184
+  p {
185
+  font-size: 0.24rem;
186
+  margin-top: 0.2rem;
79 187
   }
80
-}
81
-.mainContent{
188
+  .iconfont {
189
+  font-size: 0.5rem;
190
+  display: inline-block;
191
+  }
192
+  }
193
+  &.active {
194
+  a {
195
+  color: #409eff;
196
+  }
197
+  }
198
+  }
199
+  }
200
+  }
201
+  }
202
+  }
203
+  .mainContent{
82 204
   margin: 0 0 0 1.58rem;
83
-}
84
-</style>
205
+  }
206
+
207
+</style>

+ 41 - 0
src/pages/main/today/TodayTab.vue 파일 보기

@@ -18,7 +18,10 @@
18 18
           </li>
19 19
           <li @click="menuClick(4)">
20 20
             <img src="@/assets/record/5.png">
21
+            <span class="redpoint" v-if="getUnReadNum()">{{getUnReadNum()}}
22
+           </span>
21 23
             <p>临时医嘱</p>
24
+
22 25
           </li>
23 26
           <li @click="menuClick(5)">
24 27
             <img src="@/assets/record/6.png">
@@ -992,6 +995,30 @@ export default {
992 995
     },
993 996
     destroyed() {
994 997
       window.removeEventListener("scroll", this.handleScroll);
998
+    },getUnReadNum(){
999
+        let doctorAdvice = []
1000
+        for (let y = 0; y <  this.doctor_advices.length;y++) {
1001
+          if (this.doctor_advices[y].execution_state == 2) {
1002
+            doctorAdvice.push(this.doctor_advices[y])
1003
+          }
1004
+        }
1005
+      const sorted = this.groupBy(doctorAdvice, function (item) {
1006
+        return [item.groupno];
1007
+      });
1008
+
1009
+      return sorted.length
1010
+
1011
+
1012
+    }, groupBy (array, f) {
1013
+      const groups = {}
1014
+      array.forEach(function (o) {
1015
+        const group = JSON.stringify(f(o))
1016
+        groups[group] = groups[group] || []
1017
+        groups[group].push(o)
1018
+      })
1019
+      return Object.keys(groups).map(function (group) {
1020
+        return groups[group]
1021
+      })
995 1022
     }
996 1023
   }
997 1024
 };
@@ -1038,5 +1065,19 @@ export default {
1038 1065
     font-size: 20px!important;
1039 1066
   }
1040 1067
 }
1068
+  .redpoint{
1069
+  display:inline-block;
1070
+  height:16px;
1071
+  width:16px;
1072
+  line-height:16px;
1073
+  text-align:center;
1074
+  font-size:0.1em;
1075
+  border-radius:16px;
1076
+  color:#fff;
1077
+  background:red;
1078
+  position: relative;
1079
+  top: -8px;
1080
+  right: 8px;
1081
+  }
1041 1082
 </style>
1042 1083
 

+ 7 - 0
src/pages/main/today/assessmentBefore.vue 파일 보기

@@ -14,6 +14,13 @@
14 14
           <span class="content">{{ systolic_blood_pressure?systolic_blood_pressure:''}}</span>
15 15
           <span class="unit">{{ systolic_blood_pressure?'mmHg':''}}</span>
16 16
         </li>
17
+
18
+        <li>
19
+          <label>舒张压 : </label>
20
+          <span class="content">{{ diastolic_blood_pressure?diastolic_blood_pressure:''}}</span>
21
+          <span class="unit">{{ diastolic_blood_pressure?'mmHg':''}}</span>
22
+        </li>
23
+
17 24
         <li>
18 25
           <label>前次透析后: </label>
19 26
           <span class="content">{{ last_post_dialysis}}</span>

+ 108 - 105
src/pages/waitingRoom/components/data_list.vue 파일 보기

@@ -1,122 +1,125 @@
1 1
 <template>
2 2
   <div>
3
-    <div class="data" v-for="schedual in scheduals" :value="schedual.id" :key="schedual.id" @click="detailAction(schedual)">
4
-     <!-- <router-link to="/details"> -->
5
-        <div class="name">
6
-            <span>{{schedual.patient.name}}</span>
7
-            <span>{{schedual.treatment_mode.name}}</span>
8
-        </div>
9
-        <div class="state" :class="stateColor(schedual)">
10
-            <span>{{stateText(schedual)}}</span>
11
-            <span> | </span>
12
-            <span>{{schedual.device_number.number}}</span>
13
-        </div>
14
-     <!-- </router-link>  -->
3
+    <div class="data" v-for="schedual in scheduals" :value="schedual.id" :key="schedual.id"
4
+         @click="detailAction(schedual)">
5
+      <!-- <router-link to="/details"> -->
6
+
7
+      <div class="name">
8
+        <span>{{schedual.patient.name}}</span>
9
+        <span>{{schedual.treatment_mode.name}}</span>
10
+      </div>
11
+      <div class="state" :class="stateColor(schedual)">
12
+        <span>{{stateText(schedual)}}</span>
13
+        <span> | </span>
14
+        <span>{{schedual.device_number.number}}</span>
15
+
16
+        <span v-if="schedual.doc"></span>
17
+
18
+      </div>
19
+      <!-- </router-link>  -->
15 20
     </div>
16 21
   </div>
17 22
 </template>
18 23
 
19 24
 <script>
20
-export default {
21
-  name: "DataList",
22
-  data() {
23
-    return {
24
-      
25
-    };
26
-  },
27
-
28
-  props: {
29
-    scheduals: {
30
-      require: true,
31
-      type: Array,
32
-    }
33
-  },
34
-
35
-  methods:{
36
-    stateColor: function(schedual) {
37
-      var state = this.computeState(schedual)
38
-      if (state == 1) {
39
-        return "blue";
40
-      } else if (state == 2) {
41
-        return "gray";
42
-      } else if (state == 3) {
43
-        return "green";
44
-      } else {
45
-        return "blue";
46
-      }
25
+  export default {
26
+    name: 'DataList',
27
+    data () {
28
+      return {}
47 29
     },
48
-    stateText: function(schedual) {
49
-      var state = this.computeState(schedual)
50
-      if (state == 1) {
51
-        return "已上机";
52
-      } else if (state == 2) {
53
-        return "已下机";
54
-      } else if (state == 3) {
55
-        return "监测中";
56
-      } else {
57
-        return schedual.patient.gender == 1 ? "男" : "女"
58
-        // return "未上机";
30
+
31
+    props: {
32
+      scheduals: {
33
+        require: true,
34
+        type: Array,
59 35
       }
60 36
     },
61
-    computeState: function(schedual) {
62
-      if (schedual.dialysis_order == null) { // 未上机
63
-        return 4
64
-      } else if (schedual.dialysis_order.stage == 2) { // 已下机
65
-        return 2
66
-      } else if (schedual.dialysis_order.stage == 1 && schedual.monitoring_records != null && schedual.monitoring_records.length > 1) { // 监测中
67
-        return 3
68
-      } else {
69
-        return 1
37
+
38
+    methods: {
39
+      stateColor: function (schedual) {
40
+        var state = this.computeState(schedual)
41
+        if (state == 1) {
42
+          return 'blue'
43
+        } else if (state == 2) {
44
+          return 'gray'
45
+        } else if (state == 3) {
46
+          return 'green'
47
+        } else {
48
+          return 'blue'
49
+        }
50
+      },
51
+      stateText: function (schedual) {
52
+        var state = this.computeState(schedual)
53
+        if (state == 1) {
54
+          return '已上机'
55
+        } else if (state == 2) {
56
+          return '已下机'
57
+        } else if (state == 3) {
58
+          return '监测中'
59
+        } else {
60
+          return schedual.patient.gender == 1 ? '男' : '女'
61
+          // return "未上机";
62
+        }
63
+      },
64
+      computeState: function (schedual) {
65
+        if (schedual.dialysis_order == null) { // 未上机
66
+          return 4
67
+        } else if (schedual.dialysis_order.stage == 2) { // 已下机
68
+          return 2
69
+        } else if (schedual.dialysis_order.stage == 1 && schedual.monitoring_records != null && schedual.monitoring_records.length > 1) { // 监测中
70
+          return 3
71
+        } else {
72
+          return 1
73
+        }
74
+      },
75
+      detailAction: function (schedual) {
76
+        // console.log(schedual)
77
+        var patient_id = schedual.patient.id
78
+        var date = schedual.schedule_date
79
+        this.$router.push({path: '/details', query: {patient_id: patient_id, date: date}})
70 80
       }
71
-    },
72
-    detailAction: function(schedual) {
73
-      // console.log(schedual)
74
-      var patient_id = schedual.patient.id
75
-      var date = schedual.schedule_date
76
-      this.$router.push({ path: "/details", query: {patient_id: patient_id, date: date}})
77 81
     }
78 82
   }
79
-};
80 83
 </script>
81 84
 
82
-<style style="stylesheet/scss" lang="scss"  scoped>
83
- .data {
84
-      width: 3.32rem;
85
-      margin: 0 0 0.3rem 0.42rem;
86
-      float: left;
87
-      border-radius: 5px;
88
-      text-align: center;
89
-      font-size: 0.34rem;
90
-      background: $base-color;
91
-      .name {
92
-        font-size: 0.34rem;
93
-        padding: 0.55rem 0 0.4rem 0;
94
-        line-height: 0.5rem;
95
-        color: $pgh-color;
96
-        span {
97
-          display: block;
98
-        }
99
-      }
100
-      .state {
101
-        font-size: 0.28rem;
102
-        // background: $font-color;
103
-        height: 0.8rem;
104
-        line-height: 0.8rem;
105
-        color: $text-color;
106
-        border-radius: 0 0 5px 5px;
107
-      }
108
-      .blue {
109
-        background: $main-color;
110
-      }
111
-      .green {
112
-        background: #5bd18b;
113
-      }
114
-      .gray {
115
-        background: #a8b3ba;
116
-      }
117
-      .lightGray {
118
-        background: #c6cdd2;
119
-      }
120
-    }
85
+<style style="stylesheet/scss" lang="scss" scoped>
86
+  .data {
87
+  width: 3.32rem;
88
+  margin: 0 0 0.3rem 0.42rem;
89
+  float: left;
90
+  border-radius: 5px;
91
+  text-align: center;
92
+  font-size: 0.34rem;
93
+  background: $base-color;
94
+  .name {
95
+  font-size: 0.34rem;
96
+  padding: 0.55rem 0 0.4rem 0;
97
+  line-height: 0.5rem;
98
+  color: $pgh-color;
99
+  span {
100
+  display: block;
101
+  }
102
+  }
103
+  .state {
104
+  font-size: 0.28rem;
105
+  // background: $font-color;
106
+  height: 0.8rem;
107
+  line-height: 0.8rem;
108
+  color: $text-color;
109
+  border-radius: 0 0 5px 5px;
110
+  }
111
+  .blue {
112
+  background: $main-color;
113
+  }
114
+  .green {
115
+  background: #5bd18b;
116
+  }
117
+  .gray {
118
+  background: #a8b3ba;
119
+  }
120
+  .lightGray {
121
+  background: #c6cdd2;
122
+  }
123
+  }
121 124
 </style>
122 125
 

+ 4 - 3
src/pages/waitingRoom/components/waitingcontent.vue 파일 보기

@@ -34,7 +34,7 @@ export default {
34 34
         { value: "2", label: "透前称量", count:0 },
35 35
         { value: "3", label: "制定处方", count:0 }
36 36
       ],
37
-      
37
+
38 38
       select_index: 0,
39 39
 
40 40
       scheduals: [],
@@ -44,7 +44,7 @@ export default {
44 44
     filtedScheduals: function() {
45 45
       if (this.select_index == 0) {
46 46
         return this.scheduals
47
-        
47
+
48 48
       } else if (this.select_index == 1) {
49 49
         var scheduals = []
50 50
         for (let index = 0; index < this.scheduals.length; index++) {
@@ -84,6 +84,7 @@ export default {
84 84
         console.log(resp)
85 85
         if (resp.state == 1) {
86 86
           var scheduals = resp.data.scheduals
87
+          console.log(scheduals)
87 88
           var totalCount = scheduals.length
88 89
           var prescription_count = 0
89 90
           var assessment_before_dislysis_count = 0
@@ -99,7 +100,7 @@ export default {
99 100
           this.menuList[1].count = assessment_before_dislysis_count
100 101
           this.menuList[2].count = prescription_count
101 102
           this.scheduals = scheduals
102
-          
103
+
103 104
         } else {
104 105
           this.$toast({
105 106
             message: resp.msg,