Przeglądaj źródła

Merge branch 'superman' of http://git.shengws.com/zhangbj/xt_vue into superman

xiaoming_global 5 lat temu
rodzic
commit
e0f3dd16c1

+ 19 - 0
src/api/dialysis.js Wyświetl plik

@@ -252,3 +252,22 @@ export function CreateGroupAdvice(id, groupno, advices){
252 252
 
253 253
 
254 254
 
255
+export function GetSolution(params){
256
+  return request({
257
+    url:"/api/solution/get",
258
+    method:'get',
259
+    params:params,
260
+  })
261
+
262
+}
263
+
264
+
265
+
266
+export function CreateDryWeight(params){
267
+  return request({
268
+    url:"/api/dryweight/commit",
269
+    method:'post',
270
+    params:params,
271
+  })
272
+
273
+}

+ 52 - 4
src/api/dialysis_record.js Wyświetl plik

@@ -43,7 +43,7 @@ export function editMonitor(patient_id, schedule_date, data) {
43 43
   })
44 44
 }
45 45
 
46
-export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_drawing, puncture_nurse_id, start_time) {
46
+export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_drawing, puncture_nurse_id, start_time,schedual_type) {
47 47
   var params = {
48 48
     patient_id: patient_id,
49 49
     date: schedule_date,
@@ -51,7 +51,8 @@ export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_
51 51
     bed: bed_id,
52 52
     puncture_nurse: puncture_nurse_id,
53 53
     start_time: start_time,
54
-    lood_drawing: lood_drawing
54
+    lood_drawing: lood_drawing,
55
+    schedual_type:schedual_type,
55 56
   }
56 57
   return request({
57 58
     url: '/api/dialysis/start_record',
@@ -60,11 +61,12 @@ export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_
60 61
   })
61 62
 }
62 63
 
63
-export function finishDialysis(patient_id, schedule_date, nurse_id) {
64
+export function finishDialysis(patient_id, schedule_date,end_time, nurse_id) {
64 65
   var params = {
65 66
     patient_id: patient_id,
66 67
     date: schedule_date,
67
-    nurse: nurse_id
68
+    nurse: nurse_id,
69
+    end_time:end_time,
68 70
   }
69 71
   return request({
70 72
     url: '/api/dialysis/finish',
@@ -94,5 +96,51 @@ export function getLongAdvice(params) {
94 96
 }
95 97
 
96 98
 
99
+export function GetSchedualNumber(params) {
100
+  return request({
101
+    url:'/api/schedule/get',
102
+    method:'Get',
103
+    params:params,
104
+  })
105
+}
106
+
107
+
108
+
109
+export function PostModifyStartDialysis(params) {
110
+  return request({
111
+    url:'/api/start_dialysis/modify',
112
+    method:'Post',
113
+    params:params,
114
+  })
115
+}
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+export function PostModifyFinishDialysis(params) {
124
+  return request({
125
+    url:'/api/finish_dialysis/modify',
126
+    method:'Post',
127
+    params:params,
128
+  })
129
+}
130
+
131
+
132
+
133
+export function getTodayMonitor(params) {
134
+  return request({
135
+    url:'/api/today_monitor/get',
136
+    method:'Get',
137
+    params:params,
138
+  })
139
+}
140
+
141
+
142
+
143
+
144
+
97 145
 
98 146
 

+ 11 - 0
src/api/patient.js Wyświetl plik

@@ -332,3 +332,14 @@ export function getAllData(id, page, limit) {
332 332
   })
333 333
 }
334 334
 
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+

+ 3 - 3
src/store/modules/globalConfig.js Wyświetl plik

@@ -104,10 +104,10 @@ const global_config = {
104 104
     },
105 105
     anticoagulants_confit: {// 抗凝剂
106 106
       1: { id: 1, name: '无肝素', type: 1, shouji: 2, weichi: 2, zongliang: 2, gaimingcheng: -1, gaijiliang: -1, shouji_unit: 'mg', weichi_unit: 'mg/h', zongliang_unit: 'mg', gaimingcheng_unit: '', gaijiliang_unit: '' },
107
-      2: { id: 2, name: '普通肝素', type: 1, shouji: 1, weichi: 1, zongliang: 1, gaimingcheng: -1, gaijiliang: -1, shouji_unit: 'mg', weichi_unit: 'mg/h', zongliang_unit: 'mg', gaimingcheng_unit: '', gaijiliang_unit: '' },
108
-      3: { id: 3, name: '低分子肝素', type: 1, shouji: -1, weichi: -1, zongliang: 1, gaimingcheng: -1, gaijiliang: -1, shouji_unit: 'lu', weichi_unit: 'lu', zongliang_unit: 'lu', gaimingcheng_unit: '', gaijiliang_unit: '' },
107
+      2: { id: 2, name: '普通肝素', type: 1, shouji: 1, weichi: 1, zongliang: 1, gaimingcheng: -1, gaijiliang: -1, shouji_unit: 'iu', weichi_unit: 'iu/h', zongliang_unit: 'iu', gaimingcheng_unit: '', gaijiliang_unit: '' },
108
+      3: { id: 3, name: '低分子肝素', type: 1, shouji: 1, weichi: 1, zongliang: 1, gaimingcheng: -1, gaijiliang: -1, shouji_unit: 'iu', weichi_unit: 'iu/h', zongliang_unit: 'iu', gaimingcheng_unit: '', gaijiliang_unit: '' },
109 109
       4: { id: 4, name: '阿加曲班', type: 1, shouji: 1, weichi: 1, zongliang: 1, gaimingcheng: -1, gaijiliang: -1, shouji_unit: 'mg', weichi_unit: 'mg/h', zongliang_unit: 'mg', gaimingcheng_unit: '', gaijiliang_unit: '' },
110
-      5: { id: 5, name: '枸橼酸钠', type: 1, shouji: -1, weichi: 1, zongliang: -1, gaimingcheng: 1, gaijiliang: 1, shouji_unit: '', weichi_unit: 'ml/h', zongliang_unit: '', gaimingcheng_unit: 'ml/h', gaijiliang_unit: '' }
110
+      5: { id: 5, name: '枸橼酸钠', type: 1, shouji: -1, weichi: 1, zongliang: -1, gaimingcheng: 1, gaijiliang: 1, shouji_unit: '', weichi_unit: 'ml/h', zongliang_unit: '', gaimingcheng_unit: 'ml', gaijiliang_unit: '' }
111 111
     },
112 112
     anticoagulants_set: {
113 113
       type: 2

+ 5 - 4
src/xt_pages/dialysis/details/BasicInfor.vue Wyświetl plik

@@ -10,7 +10,7 @@
10 10
         </ul>
11 11
       </div>
12 12
       <ul class="info clearfix">
13
-        <li>  
13
+        <li>
14 14
           <label>姓名 : </label>
15 15
           <span>{{ patient.id == 0 ? "" : patient.name }}</span>
16 16
         </li>
@@ -56,7 +56,7 @@ export default {
56 56
   data() {
57 57
     return {
58 58
       title: '基本信息',
59
-      dialysis_time: moment(new Date()).format('YYYY-MM-DD')
59
+      dialysis_time:0,
60 60
       // steps: [
61 61
       //   { title: "透析处方" },
62 62
       //   { title: "接诊评估" },
@@ -106,7 +106,8 @@ export default {
106 106
     }
107 107
   },
108 108
   created() {
109
-    console.log('patinents是什么ha ', this.patient)
109
+    this.dialysis_time = parseTime(this.$route.query.date, '{y}-{m}-{d}')
110
+
110 111
   }
111 112
 }
112 113
 </script>
@@ -206,7 +207,7 @@ export default {
206 207
   }
207 208
 }
208 209
 .info {
209
-    padding:20px 40px;  
210
+    padding:20px 40px;
210 211
     li {
211 212
       float: left;
212 213
       width: 28%;

+ 139 - 69
src/xt_pages/dialysis/details/DialysisPrescription.vue Wyświetl plik

@@ -11,93 +11,149 @@
11 11
           <label>目标超滤量 : </label>
12 12
           <span class="content">{{target_ultrafiltration != '0'?target_ultrafiltration:''}}</span>
13 13
           <span class="unit">{{target_ultrafiltration != '0'?"L":''}}</span>
14
+        </li>
15
+
16
+
14 17
 
18
+
19
+        <li v-if="isShow('抗凝剂')">
20
+          <label>抗凝剂 : </label>
21
+          <span class="content">{{anticoagulant}}</span>
15 22
         </li>
16
-        <li v-if="isShow('首剂')">
17
-          <label>首剂 : </label>
18
-          <span class="content">{{anticoagulant_shouji != '0'?anticoagulant_shouji:''}}</span>
19
-          <span class="unit">{{anticoagulant_shouji != '0'?"mg":''}}</span>
23
+
24
+
25
+
26
+        <li v-if="isShow('总量')&&getValueStr('anticoagulant','anticoagulant') != 5">
27
+          <label>总量: </label>
28
+          <span class="content" v-if="getValueStr('anticoagulant','anticoagulant') != 1">{{anticoagulant_zongliang != '0'?anticoagulant_zongliang:""}}</span>
29
+          <span class="content" v-if="getValueStr('anticoagulant','anticoagulant') == 1"></span>
30
+
31
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 2">{{anticoagulant_zongliang != '0'?"iu":""}}</span>
32
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 3">{{anticoagulant_zongliang != '0'?"iu":""}}</span>
33
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 1">{{anticoagulant_zongliang != '0'?"mg":""}}</span>
34
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 4">{{anticoagulant_zongliang != '0'?"mg":""}}</span>
35
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 5">{{anticoagulant_zongliang != '0'?"ml":""}}</span>
20 36
         </li>
21
-        <li v-if="isShow('钙')">
22
-          <label>钙: </label>
23
-          <span class="content">{{calcium != '0'?calcium:""}}</span>
24
-          <span class="unit">{{calcium != '0'?"mmol/L":""}}</span>
37
+
38
+
39
+
40
+        <li v-if="isShow('钙剂量')&&getValueStr('anticoagulant','anticoagulant') == 5">
41
+          <label>钙剂量: </label>
42
+          <span class="content">{{getValueStr('anticoagulant_gaijiliang','anticoagulant_gaijiliang')}}</span>
43
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 5">{{'ml'}}</span>
44
+        </li>
45
+
46
+
47
+        <li v-if="isShow('钠')">
48
+          <label>钠 : </label>
49
+          <span class="content">{{sodium != '0'?sodium:""}}</span>
50
+          <span class="unit">{{sodium != '0'?"mmol/L":""}}</span>
25 51
         </li>
52
+
53
+        <li v-if="isShow('体液过多症状')">
54
+          <label>体液过多症状 : </label>
55
+          <span class="content">{{body_fluid}}</span>
56
+          <span class="unit"></span>
57
+        </li>
58
+
59
+
60
+
26 61
         <li v-if="isShow('置换量')">
27 62
           <label>置换量 : </label>
28 63
           <span class="content">{{replacement_total != '0'?replacement_total:""}}</span>
29 64
           <span class="unit">{{replacement_total != '0'?"L":""}}</span>
30 65
         </li>
31 66
 
67
+
68
+        <li v-if="isShow('透析前使用其他特殊药物')">
69
+          <label>透析前使用其他特殊药物: </label>
70
+          <span class="content">{{special_medicine_other}}</span>
71
+          <span class="unit"></span>
72
+        </li>
73
+
32 74
         <li v-if="isShow('葡萄糖')">
33 75
           <label>葡萄糖 : </label>
34 76
           <span class="content">{{glucose != '0'?glucose:""}}</span>
35 77
           <span class="unit">{{glucose != '0'?"mmol/l":""}}</span>
36 78
         </li>
37
-         <li v-if="isShow('透析时长')">
79
+
80
+
81
+      </ul>
82
+
83
+
84
+      <ul>
85
+        <li v-if="isShow('透析时长')">
38 86
           <label>透析时长 : </label>
39 87
           <span class="content">{{dialysis_duration != '0'?dialysis_duration:""}}</span>
40 88
         </li>
41
-         <li v-if="isShow('透析液配方')">
42
-          <label>透析液配方 : </label>
43
-          <span class="content">{{dialysate_formulation}}</span>
89
+        <li v-if="isShow('透析液温度')">
90
+          <label>透析液温度 : </label>
91
+          <span class="content">{{dialysate_temperature != '0'?dialysate_temperature:""}}</span>
92
+          <span class="unit">{{dialysate_temperature != '0'?"℃":""}}</span>
44 93
         </li>
45
-         <li v-if="isShow('维持')">
46
-          <label>维持 : </label>
47
-          <span class="content">{{anticoagulant_weichi != '0'?anticoagulant_weichi:""}}</span>
48
-          <span class="unit">{{anticoagulant_weichi != '0'?"mg/h":""}}</span>
94
+
95
+
96
+        <li v-if="isShow('首剂')&&getValueStr('anticoagulant','anticoagulant') != 5">
97
+          <label>首剂 : </label>
98
+          <span class="content" v-if="getValueStr('anticoagulant','anticoagulant') != 1">{{anticoagulant_shouji != '0'?anticoagulant_shouji:''}}</span>
99
+          <span class="content" v-if="getValueStr('anticoagulant','anticoagulant') == 1"></span>
100
+
101
+          <!--<span class="unit">{{anticoagulant_shouji != '0'?"mg":''}}</span>-->
102
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 2">{{anticoagulant_shouji != '0'?"iu":""}}</span>
103
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 3">{{anticoagulant_shouji != '0'?"iu":""}}</span>
104
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 1">{{anticoagulant_shouji != '0'?"mg":""}}</span>
105
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 4">{{anticoagulant_shouji != '0'?"mg":""}}</span>
106
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 5">{{anticoagulant_shouji != '0'?"mg":""}}</span>
107
+
49 108
         </li>
50
-      </ul>
51
-      <ul>
109
+
110
+        <li v-if="isShow('钙名称')&&getValueStr('anticoagulant','anticoagulant') == 5">
111
+          <label>钙名称: </label>
112
+          <span class="content">{{getValueStr('anticoagulant_gaimingcheng','anticoagulant_gaimingcheng')}}</span>
113
+        </li>
114
+
52 115
         <li v-if="isShow('钾')">
53 116
           <label>钾 : </label>
54 117
           <span class="content">{{kalium != '0'?kalium:""}}</span>
55 118
           <span class="unit">{{kalium != '0'?"mmol/L":""}}</span>
56 119
         </li>
120
+
121
+
122
+
57 123
         <li v-if="isShow('碳酸氢盐')">
58 124
           <label>碳酸氢盐 : </label>
59 125
           <span class="content">{{bicarbonate != '0'?bicarbonate:""}}</span>
60 126
           <span class="unit">{{bicarbonate != '0'?"mmol/L":""}}</span>
61 127
         </li>
62
-        <!-- <li>
63
-          <label>干体重 : </label>
64
-          <span class="content">{{dry_weight}}</span>
65
-          <span class="unit">kg</span>
66
-        </li> -->
67
-        <li v-if="isShow('透析液温度')">
68
-          <label>透析液温度 : </label>
69
-          <span class="content">{{dialysate_temperature != '0'?dialysate_temperature:""}}</span>
70
-          <span class="unit">{{dialysate_temperature != '0'?"℃":""}}</span>
128
+
129
+        <li v-if="isShow('体液过多其他症状')">
130
+          <label>体液过多其他症状 : </label>
131
+          <span class="content">{{body_fluid_other}}</span>
132
+          <span class="unit"></span>
71 133
         </li>
72
-         <li v-if="isShow('血流量')">
134
+
135
+
136
+
137
+
138
+
139
+        <li v-if="isShow('血流量')">
73 140
           <label>血流量 : </label>
74 141
           <span class="content">{{blood_flow_volume != '0'?blood_flow_volume:''}}</span>
75 142
           <span class="unit">{{blood_flow_volume != '0'?"ml/min":''}}</span>
76 143
         </li>
77
-        <li v-if="isShow('抗凝剂')">
78
-          <label>抗凝剂 : </label>
79
-          <span class="content">{{anticoagulant}}</span>
80
-        </li>
81
-          <li v-if="isShow('总量')">
82
-          <label>总量: </label>
83
-          <span class="content">{{anticoagulant_zongliang != '0'?anticoagulant_zongliang:""}}</span>
84
-          <span class="unit">{{anticoagulant_zongliang != '0'?"mg":""}}</span>
85
-        </li>
86
-        <li v-if="isShow('钠')">
87
-          <label>钠 : </label>
88
-          <span class="content">{{sodium != '0'?sodium:""}}</span>
89
-          <span class="unit">{{sodium != '0'?"mmol/L":""}}</span>
144
+
145
+        <li v-if="isShow('透析液配方')">
146
+          <label>透析液配方 : </label>
147
+          <span class="content">{{dialysate_formulation}}</span>
90 148
         </li>
149
+
150
+
91 151
           <li v-if="isShow('透析液流量')">
92 152
           <label>透析液流量 : </label>
93 153
           <span class="content">{{dialysate_flow != '0'?dialysate_flow:""}}</span>
94 154
           <span class="unit">{{dialysate_flow != '0'?"ml/min":""}}</span>
95 155
         </li>
96
-           <li v-if="isShow('电导度')">
97
-          <label>电导度 : </label>
98
-          <span class="content">{{conductivity != '0'?conductivity:""}}</span>
99
-          <span class="unit">{{conductivity != '0'?"mS/m":""}}</span>
100
-        </li>
156
+
101 157
       </ul>
102 158
       <ul>
103 159
 
@@ -106,44 +162,58 @@
106 162
           <span class="content">{{dialyzer_perfusion_apparatus}}</span>
107 163
           <span class="unit"></span>
108 164
         </li>
109
-
110
-        <li v-if="isShow('体液过多症状')">
111
-          <label>体液过多症状 : </label>
112
-          <span class="content">{{body_fluid}}</span>
113
-          <span class="unit"></span>
165
+        <li v-if="isShow('实际超滤量')">
166
+          <label>实际超滤量: </label>
167
+          <span class="content">{{ultrafiltration != '0'? ultrafiltration:''}}</span>
168
+          <span class="unit">{{ultrafiltration != '0'?"L":""}}</span>
114 169
         </li>
115
-        <li v-if="isShow('体液过多其他症状')">
116
-          <label>体液过多其他症状 : </label>
117
-          <span class="content">{{body_fluid_other}}</span>
118
-          <span class="unit"></span>
170
+        <li v-if="isShow('维持')&&getValueStr('anticoagulant','anticoagulant') != 5">
171
+          <label>维持 : </label>
172
+          <span class="content" v-if="getValueStr('anticoagulant','anticoagulant') != 1">{{anticoagulant_weichi != '0'?anticoagulant_weichi:""}}</span>
173
+          <span class="content" v-if="getValueStr('anticoagulant','anticoagulant') == 1"></span>
174
+
175
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 2">{{anticoagulant_weichi != '0'?"iu":""}}</span>
176
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 3">{{anticoagulant_weichi != '0'?"iu":""}}</span>
177
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 1">{{anticoagulant_weichi != '0'?"mg":""}}</span>
178
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 4">{{anticoagulant_weichi != '0'?"mg":""}}</span>
179
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 5">{{anticoagulant_weichi != '0'?"ml":""}}</span>
119 180
         </li>
120
-        <li v-if="isShow('透析前使用特殊药物')">
121
-          <label>透析前使用特殊药物: </label>
122
-          <span class="content">{{special_medicine}}</span>
123
-          <span class="unit"></span>
181
+
182
+        <li v-if="isShow('钙')">
183
+          <label>钙: </label>
184
+          <span class="content">{{calcium != '0'?calcium:""}}</span>
185
+          <span class="unit">{{calcium != '0'?"mmol/L":""}}</span>
124 186
         </li>
125
-        <li v-if="isShow('透析前使用其他特殊药物')">
126
-          <label>透析前使用其他特殊药物: </label>
127
-          <span class="content">{{special_medicine_other}}</span>
128
-          <span class="unit"></span>
187
+
188
+        <li v-if="isShow('电导度')">
189
+          <label>电导度 : </label>
190
+          <span class="content">{{conductivity != '0'?conductivity:""}}</span>
191
+          <span class="unit">{{conductivity != '0'?"mS/m":""}}</span>
129 192
         </li>
193
+
194
+
130 195
         <li v-if="isShow('置换液')">
131 196
           <label v-if="this.$store.getters.xt_user.template_info.template_id != 6">置换液: </label>
132 197
           <label v-if="this.$store.getters.xt_user.template_info.template_id == 6">置换方式: </label>
133 198
 
134
-          <span class="content">{{displace_liqui}}</span>
199
+          <span class="content">{{displace_liqui != '0'?displace_liqui:''}}</span>
200
+          <span class="unit">{{displace_liqui != '0'?'L':''}}</span>
201
+        </li>
202
+
203
+
204
+        <li v-if="isShow('透析前使用特殊药物')">
205
+          <label>透析前使用特殊药物: </label>
206
+          <span class="content">{{special_medicine}}</span>
135 207
           <span class="unit"></span>
136 208
         </li>
209
+
210
+
137 211
         <li v-if="isShow('血管通路')">
138 212
           <label>血管通路: </label>
139 213
           <span class="content">{{blood_access}}</span>
140 214
           <span class="unit"></span>
141 215
         </li>
142
-        <li v-if="isShow('实际超滤量')">
143
-          <label>实际超滤量: </label>
144
-          <span class="content">{{ultrafiltration != '0'? ultrafiltration:''}}</span>
145
-          <span class="unit">{{ultrafiltration != '0'?"L":""}}</span>
146
-        </li>
216
+
147 217
         <li v-if="isShow('目标KT/V')">
148 218
           <label>目标KT/V: </label>
149 219
           <span class="content">{{target_ktv != '0'? target_ktv:''}}</span>

+ 441 - 351
src/xt_pages/dialysis/details/NavIgation.vue Wyświetl plik

@@ -1,375 +1,465 @@
1 1
 <template>
2
-    <div>
3
-        <div class="grid">
4
-            <div class="list">
5
-                <ul>
6
-                    <li @click="showPrescription">
7
-                        <img src="@/assets/record/1.png">
8
-                        <p>透析处方</p>
9
-                    </li>
10
-                    <li @click="showAccepts">
11
-                        <img src="@/assets/record/2.png">
12
-                        <p>接诊评估</p>
13
-                    </li>
14
-                    <li @click="showAssessmentBefore">
15
-                        <img src="@/assets/record/3.png">
16
-                        <p>透前评估</p>
17
-                    </li>
18
-                    <li @click="showDoctorAdviceDialog">
19
-                        <img src="@/assets/record/4.png">
20
-                        <p>临时医嘱</p>
21
-                    </li>
22
-                    <li @click="showDoubleCheck">
23
-                        <img src="@/assets/record/5.png">
24
-                        <p>双人核对</p>
25
-                    </li>
26
-                </ul>
27
-            </div>
28
-            <div class="list">
29
-                <ul>
30
-                    <li @click="showComputerDialog">
31
-                        <img src="@/assets/record/6.png" >
32
-                        <p>透析上机</p>
33
-                    </li>
34
-                    <li @click="showMonitorDialog">
35
-                        <img src="@/assets/record/7.png" >
36
-                        <p>透析监测</p>
37
-                    </li>
38
-                    <li @click="showFinishDialog">
39
-                        <img src="@/assets/record/8.png" >
40
-                        <p>透析下机</p>
41
-                    </li>
42
-                    <li @click="showAssessmentAfterDialog">
43
-                        <img src="@/assets/record/9.png" >
44
-                        <p>透后评估</p>
45
-                    </li>
46
-                    <li @click="showrTeatmentSummary" >
47
-                        <img src="@/assets/record/10.png" >
48
-                        <p>治疗小结</p>
49
-                    </li>
50
-                </ul>
51
-            </div>
52
-        </div>
53
-
54
-        <div class="middleLine"></div>
55
-
56
-        <dialysis-prescription-dialog title="透析处方" ref="prescription" :patient="patient" :prescription="prescription" :solution="solution" @advice="adviceFunc"
57
-                                      :niprocart_info="niprocart_info" :jms_info="jms_info" :fistula_needle_set_info="fistula_needle_set_info"
58
-        :fistula_needle_set_16_info="fistula_needle_set_16_info"  :hemoperfusion_info="hemoperfusion_info" :dialyser_sterilised_info="dialyser_sterilised_info"
59
-        :filtryzer_info="filtryzer_info" :dialyzers_info="dialyzers_info" :injector_info="injector_info" :bloodlines_info="bloodlines_info"  :tubingHemodialysis_info="tubingHemodialysis_info"
60
-        :safe_package_info="safe_package_info" :aliquid_info="aliquid_info" :config="config" :admin_users="admin_users"  :targetAdvices="longAdvices"
61
-                                      :waitUploadAdvices="waitUploadAdvices" :is_open="is_open"
62
-
63
-        ></dialysis-prescription-dialog>
64
-
65
-        <double-check-dialog title="双人核对" ref="doubleCheck" :patient="patient" :double_check="double_check" :admin_users="admin_users" ></double-check-dialog>
66
-
67
-        <accepts-treatment-dialog title="接诊评估" ref="accepts" :patient="patient" :receiver_treatment_access="receiver_treatment_access"></accepts-treatment-dialog>
68
-
69
-        <assessment-before-dislysis-dialog title="透前评估" ref="assessmentBefore" :patient="patient" :predialysis_evaluation="predialysis_evaluation"></assessment-before-dislysis-dialog>
70
-
71
-        <treatment-summary-dialog title="治疗小结" ref="treatmentSummary" :patient="patient" :treatment_summary="treatment_summary"></treatment-summary-dialog>
72
-
73
-        <doctor-advice-dialog title="临时医嘱" ref="doctor_advice" :doctor_advices="doctor_advices" :patient="patient" :admin_users="admin_users" :dialysis_order="dialysis_order" ></doctor-advice-dialog>
74
-
75
-        <computer-dialog title="透析上机" ref="computer_dialog" :dialysis_order="dialysis_order" :schedule="schedual" :admins="admin_users" :device_numbers="device_numbers"></computer-dialog>
76
-
77
-        <monitor-dialog title="透析监测" ref="monitor_dialog" :monitors="monitor_records"></monitor-dialog>
78
-
79
-        <finish-dialog title="透析下机" ref="finish_dialog" :dialysis_order="dialysis_order" :schedule="schedual" :admins="admin_users"></finish-dialog>
80
-
81
-        <assessment-after-dislysis title="透后评估" ref="assessment_after_dislysis" :assessment_after_dislysis="assessment_after_dislysis" :patient="patient"  :dialysis_order="dialysis_order"></assessment-after-dislysis>
2
+  <div>
3
+    <div class="grid">
4
+      <div class="list">
5
+        <ul>
6
+          <li @click="showPrescription">
7
+            <img src="@/assets/record/1.png">
8
+            <p>透析处方</p>
9
+          </li>
10
+          <li @click="showAccepts">
11
+            <img src="@/assets/record/2.png">
12
+            <p>接诊评估</p>
13
+          </li>
14
+          <li @click="showAssessmentBefore">
15
+            <img src="@/assets/record/3.png">
16
+            <p>透前评估</p>
17
+          </li>
18
+          <li @click="showDoctorAdviceDialog">
19
+            <img src="@/assets/record/4.png">
20
+            <p>临时医嘱</p>
21
+          </li>
22
+          <li @click="showDoubleCheck">
23
+            <img src="@/assets/record/5.png">
24
+            <p>双人核对</p>
25
+          </li>
26
+        </ul>
27
+      </div>
28
+      <div class="list">
29
+        <ul>
30
+          <li @click="showComputerDialog">
31
+            <img src="@/assets/record/6.png">
32
+            <p>透析上机</p>
33
+          </li>
34
+          <li @click="showMonitorDialog">
35
+            <img src="@/assets/record/7.png">
36
+            <p>透析监测</p>
37
+          </li>
38
+          <li @click="showFinishDialog">
39
+            <img src="@/assets/record/8.png">
40
+            <p>透析下机</p>
41
+          </li>
42
+          <li @click="showAssessmentAfterDialog">
43
+            <img src="@/assets/record/9.png">
44
+            <p>透后评估</p>
45
+          </li>
46
+          <li @click="showrTeatmentSummary">
47
+            <img src="@/assets/record/10.png">
48
+            <p>治疗小结</p>
49
+          </li>
50
+        </ul>
51
+      </div>
82 52
     </div>
53
+
54
+    <div class="middleLine"></div>
55
+
56
+    <dialysis-prescription-dialog title="透析处方" ref="prescription" :patient="patient" :prescription="prescription"
57
+                                  :solution="solution" @advice="adviceFunc"
58
+                                  :niprocart_info="niprocart_info" :jms_info="jms_info"
59
+                                  :fistula_needle_set_info="fistula_needle_set_info"
60
+                                  :fistula_needle_set_16_info="fistula_needle_set_16_info"
61
+                                  :hemoperfusion_info="hemoperfusion_info"
62
+                                  :dialyser_sterilised_info="dialyser_sterilised_info"
63
+                                  :filtryzer_info="filtryzer_info" :dialyzers_info="dialyzers_info"
64
+                                  :injector_info="injector_info" :bloodlines_info="bloodlines_info"
65
+                                  :tubingHemodialysis_info="tubingHemodialysis_info"
66
+                                  :safe_package_info="safe_package_info" :aliquid_info="aliquid_info" :config="config"
67
+                                  :admin_users="admin_users" :targetAdvices="longAdvices"
68
+                                  :waitUploadAdvices="waitUploadAdvices" :is_open="is_open"
69
+
70
+                                  :predialysis="predialysis_evaluation"
71
+                                  :last_predialysis="last_predialysis_evaluation"
72
+                                  :record="assessment_after_dislysis"
73
+                                  :last_record="last_assessment_after_dislysis"
74
+                                  :last_prescription="last_dialysis_prescribe"
75
+                                  :dry_weight="last_dryWeight_dislysis"
76
+                                  :schedual="schedual"
77
+
78
+    ></dialysis-prescription-dialog>
79
+
80
+    <double-check-dialog title="双人核对" ref="doubleCheck" :patient="patient" :double_check="double_check"
81
+                         :admin_users="admin_users"></double-check-dialog>
82
+
83
+    <accepts-treatment-dialog title="接诊评估" ref="accepts" :patient="patient"
84
+                              :receiver_treatment_access="receiver_treatment_access"></accepts-treatment-dialog>
85
+
86
+    <assessment-before-dislysis-dialog title="透前评估" ref="assessmentBefore" :patient="patient" :last_predialysis="last_predialysis_evaluation"
87
+                                       :predialysis_evaluation="predialysis_evaluation" :admin_users="admin_users"  :dry_weight="last_dryWeight_dislysis"
88
+    ></assessment-before-dislysis-dialog>
89
+
90
+    <treatment-summary-dialog title="治疗小结" ref="treatmentSummary" :patient="patient"
91
+                              :treatment_summary="treatment_summary"></treatment-summary-dialog>
92
+
93
+    <doctor-advice-dialog title="临时医嘱" ref="doctor_advice" :doctor_advices="doctor_advices" :patient="patient"
94
+                          :admin_users="admin_users" :dialysis_order="dialysis_order"></doctor-advice-dialog>
95
+
96
+    <computer-dialog title="透析上机" ref="computer_dialog" :dialysis_order="dialysis_order" :schedule="schedual" @monitor="add_monitor"
97
+                     :admins="admin_users" :device_numbers="device_numbers" :special_premission="special_premission"></computer-dialog>
98
+
99
+    <monitor-dialog title="透析监测" ref="monitor_dialog" :monitors="monitor_records" ></monitor-dialog>
100
+
101
+    <finish-dialog title="透析下机" ref="finish_dialog" :dialysis_order="dialysis_order" :schedule="schedual"
102
+                   :admins="admin_users"  @assessmentAfterDislysis="assessmentAfterDislysisFunc" :special_premission="special_premission"></finish-dialog>
103
+
104
+    <assessment-after-dislysis title="透后评估" ref="assessment_after_dislysis"
105
+                               :assessment_after_dislysis="assessment_after_dislysis" :patient="patient"
106
+                               :dialysis_order="dialysis_order"></assessment-after-dislysis>
107
+  </div>
83 108
 </template>
84 109
 
85 110
 <script>
86
-import dialysisPrescriptionDialog from './dialog/dialysisPrescriptionDialog'
87
-import doubleCheckDialog from './dialog/doubleCheckDialog'
88
-import AssessmentAfterDislysis from './dialog/AssessmentAfterDislysis'
89
-import acceptsTreatmentDialog from './dialog/acceptsTreatmentDialog'
90
-import assessmentBeforeDislysisDialog from './dialog/assessmentBeforeDislysisDialog'
91
-import MonitorDialog from './dialog/monitor_dialog'
92
-import DoctorAdviceDialog from './dialog/DoctorAdviceDialog'
93
-import treatmentSummaryDialog from './dialog/treatmentSummaryDialog'
94
-import ComputerDialog from './dialog/computer_dialog'
95
-import FinishDialog from './dialog/finish_dialog'
96
-
97
-export default {
98
-  name: 'NavIgation',
99
-  components: {
100
-    dialysisPrescriptionDialog,
101
-    doubleCheckDialog,
102
-    AssessmentAfterDislysis,
103
-    acceptsTreatmentDialog,
104
-    assessmentBeforeDislysisDialog,
105
-    treatmentSummaryDialog,
106
-    MonitorDialog,
107
-    DoctorAdviceDialog,
108
-    ComputerDialog,
109
-    FinishDialog
110
-  },
111
-  data() {
112
-    return {
113
-    }
114
-  },
115
-  props: {
116
-    longAdvices: { // 临时医嘱
117
-      type: Array,
118
-      default: () => {
119
-        return []
120
-      }
121
-    },
122
-    waitUploadAdvices: { // 临时医嘱
123
-      type: Array,
124
-      default: () => {
125
-        return []
126
-      }
127
-    },
128
-    is_open: { // 临时医嘱
129
-      type: Number,
130
-      default: () => {
131
-        return 0
132
-      }
133
-    },
134
-    patient: { // 患者信息
135
-      type: Object,
136
-      default: () => {
137
-        return { id: 0 }
138
-      }
139
-    },
140
-    schedual: { // 患者排班信息
141
-      type: Object,
142
-      default: () => {
143
-        return { id: 0 }
144
-      }
145
-    },
146
-    prescription: { // 透析处方
147
-      type: Object,
148
-      default: () => {
149
-        return { id: 0 }
150
-      }
151
-    },
152
-    solution: { // 透析方案
153
-      type: Object,
154
-      default: () => {
155
-        return { id: 0 }
156
-      }
157
-    },
158
-    receiver_treatment_access: { // 接诊评估
159
-      type: Object,
160
-      default: () => {
161
-        return { id: 0 }
162
-      }
163
-    },
164
-    predialysis_evaluation: { // 透前评估
165
-      type: Object,
166
-      default: () => {
167
-        return { id: 0 }
168
-      }
169
-    },
170
-    doctor_advices: { // 临时医嘱
171
-      type: Array,
172
-      default: () => {
173
-        return []
174
-      }
175
-    },
176
-    double_check: { // 双人核对
177
-      type: Object,
178
-      default: () => {
179
-        return { id: 0 }
180
-      }
181
-    },
182
-    assessment_after_dislysis: { // 透后评估
183
-      type: Object,
184
-      default: () => {
185
-        return { id: 0 }
186
-      }
187
-    },
188
-    treatment_summary: { // 治疗小结
189
-      type: Object,
190
-      default: () => {
191
-        return { id: 0 }
192
-      }
193
-    },
194
-    monitor_records: { // 透析监测
195
-      type: Array,
196
-      default: () => {
197
-        return []
198
-      }
199
-    },
200
-    dialysis_order: { // 透析记录
201
-      type: Object,
202
-      default: () => {
203
-        return { id: 0 }
204
-      }
205
-    },
206
-    admin_users: { // 系统用户列表
207
-      type: Array,
208
-      default: () => {
209
-        return []
210
-      }
211
-    },
212
-    devices: { // 设备
213
-      type: Array,
214
-      default: () => {
215
-        return []
216
-      }
217
-    },
218
-    device_numbers: { // 床位
219
-      type: Array,
220
-      default: () => {
221
-        return []
222
-      }
223
-    },
111
+  import dialysisPrescriptionDialog from './dialog/dialysisPrescriptionDialog'
112
+  import doubleCheckDialog from './dialog/doubleCheckDialog'
113
+  import AssessmentAfterDislysis from './dialog/AssessmentAfterDislysis'
114
+  import acceptsTreatmentDialog from './dialog/acceptsTreatmentDialog'
115
+  import assessmentBeforeDislysisDialog from './dialog/assessmentBeforeDislysisDialog'
116
+  import MonitorDialog from './dialog/monitor_dialog'
117
+  import DoctorAdviceDialog from './dialog/DoctorAdviceDialog'
118
+  import treatmentSummaryDialog from './dialog/treatmentSummaryDialog'
119
+  import ComputerDialog from './dialog/computer_dialog'
120
+  import FinishDialog from './dialog/finish_dialog'
224 121
 
225
-    niprocart_info: {
226
-      type: Array,
227
-      default: () => {
228
-        return []
229
-      }
122
+  export default {
123
+    name: 'NavIgation',
124
+    components: {
125
+      dialysisPrescriptionDialog,
126
+      doubleCheckDialog,
127
+      AssessmentAfterDislysis,
128
+      acceptsTreatmentDialog,
129
+      assessmentBeforeDislysisDialog,
130
+      treatmentSummaryDialog,
131
+      MonitorDialog,
132
+      DoctorAdviceDialog,
133
+      ComputerDialog,
134
+      FinishDialog
230 135
     },
231 136
 
232
-    jms_info: {
233
-      type: Array,
234
-      default: () => {
235
-        return []
236
-      }
237
-    },
137
+    data() {
138
+      return {
238 139
 
239
-    fistula_needle_set_info: {
240
-      type: Array,
241
-      default: () => {
242
-        return []
243 140
       }
141
+    },mounted(){
244 142
     },
245 143
 
246
-    fistula_needle_set_16_info: {
247
-      type: Array,
248
-      default: () => {
249
-        return []
250
-      }
251
-    },
144
+    props: {
145
+      longAdvices: { // 临时医嘱
146
+        type: Array,
147
+        default: () => {
148
+          return []
149
+        }
150
+      },
151
+      waitUploadAdvices: { // 临时医嘱
152
+        type: Array,
153
+        default: () => {
154
+          return []
155
+        }
156
+      },
157
+      is_open: { // 临时医嘱
158
+        type: Number,
159
+        default: () => {
160
+          return 0
161
+        }
162
+      },
163
+      patient: { // 患者信息
164
+        type: Object,
165
+        default: () => {
166
+          return { id: 0 }
167
+        }
168
+      },
169
+      schedual: { // 患者排班信息
170
+        type: Object,
171
+        default: () => {
172
+          return { id: 0 }
173
+        }
174
+      },
175
+      prescription: { // 透析处方
176
+        type: Object,
177
+        default: () => {
178
+          return { id: 0 }
179
+        }
180
+      },
181
+      solution: { // 透析方案
182
+        type: Object,
183
+        default: () => {
184
+          return { id: 0 }
185
+        }
186
+      },
187
+      receiver_treatment_access: { // 接诊评估
188
+        type: Object,
189
+        default: () => {
190
+          return { id: 0 }
191
+        }
192
+      },
193
+      predialysis_evaluation: { // 透前评估
194
+        type: Object,
195
+        default: () => {
196
+          return { id: 0 }
197
+        }
198
+      },
199
+      doctor_advices: { // 临时医嘱
200
+        type: Array,
201
+        default: () => {
202
+          return []
203
+        }
204
+      },
205
+      double_check: { // 双人核对
206
+        type: Object,
207
+        default: () => {
208
+          return { id: 0 }
209
+        }
210
+      },
211
+      assessment_after_dislysis: { // 透后评估
212
+        type: Object,
213
+        default: () => {
214
+          return { id: 0 }
215
+        }
216
+      },
217
+      treatment_summary: { // 治疗小结
218
+        type: Object,
219
+        default: () => {
220
+          return { id: 0 }
221
+        }
222
+      },
223
+      monitor_records: { // 透析监测
224
+        type: Array,
225
+        default: () => {
226
+          return []
227
+        }
228
+      },
229
+      dialysis_order: { // 透析记录
230
+        type: Object,
231
+        default: () => {
232
+          return { id: 0 }
233
+        }
234
+      },
235
+      admin_users: { // 系统用户列表
236
+        type: Array,
237
+        default: () => {
238
+          return []
239
+        }
240
+      },
241
+      devices: { // 设备
242
+        type: Array,
243
+        default: () => {
244
+          return []
245
+        }
246
+      },
247
+      device_numbers: { // 床位
248
+        type: Array,
249
+        default: () => {
250
+          return []
251
+        }
252
+      },
252 253
 
253
-    hemoperfusion_info: {
254
-      type: Array,
255
-      default: () => {
256
-        return []
257
-      }
258
-    },
254
+      niprocart_info: {
255
+        type: Array,
256
+        default: () => {
257
+          return []
258
+        }
259
+      },
259 260
 
260
-    dialyser_sterilised_info: {
261
-      type: Array,
262
-      default: () => {
263
-        return []
264
-      }
265
-    },
261
+      jms_info: {
262
+        type: Array,
263
+        default: () => {
264
+          return []
265
+        }
266
+      },
266 267
 
267
-    filtryzer_info: {
268
-      type: Array,
269
-      default: () => {
270
-        return []
271
-      }
272
-    },
268
+      fistula_needle_set_info: {
269
+        type: Array,
270
+        default: () => {
271
+          return []
272
+        }
273
+      },
273 274
 
274
-    dialyzers_info: {
275
-      type: Array,
276
-      default: () => {
277
-        return []
278
-      }
279
-    },
280
-    injector_info: {
281
-      type: Array,
282
-      default: () => {
283
-        return []
284
-      }
285
-    },
286
-    bloodlines_info: {
287
-      type: Array,
288
-      default: () => {
289
-        return []
290
-      }
291
-    },
292
-    tubingHemodialysis_info: {
293
-      type: Array,
294
-      default: () => {
295
-        return []
296
-      }
297
-    },
298
-    safe_package_info: {
299
-      type: Array,
300
-      default: () => {
301
-        return []
302
-      }
303
-    },
304
-    aliquid_info: {
305
-      type: Array,
306
-      default: () => {
307
-        return []
308
-      }
309
-    },
310
-    config: {
311
-      type: Object,
312
-      default: () => {
313
-        return { id: 0 }
314
-      }
315
-    },
275
+      fistula_needle_set_16_info: {
276
+        type: Array,
277
+        default: () => {
278
+          return []
279
+        }
280
+      },
316 281
 
317
-    admin_user_map: { // {user_id: admin_user object}
318
-      type: Object,
319
-      default: () => {
320
-        return {}
321
-      }
322
-    },
323
-    device_map: { // {device_id: device object}
324
-      type: Object,
325
-      default: () => {
326
-        return {}
327
-      }
328
-    },
329
-    device_number_map: { // {device_number_id: device_number object}
330
-      type: Object,
331
-      default: () => {
332
-        return {}
333
-      }
334
-    }
335
-  },
336
-  methods: {
337
-    adviceFunc:function(){
282
+      hemoperfusion_info: {
283
+        type: Array,
284
+        default: () => {
285
+          return []
286
+        }
287
+      },
288
+
289
+      dialyser_sterilised_info: {
290
+        type: Array,
291
+        default: () => {
292
+          return []
293
+        }
294
+      },
295
+
296
+      filtryzer_info: {
297
+        type: Array,
298
+        default: () => {
299
+          return []
300
+        }
301
+      },
302
+
303
+      dialyzers_info: {
304
+        type: Array,
305
+        default: () => {
306
+          return []
307
+        }
308
+      },
309
+      injector_info: {
310
+        type: Array,
311
+        default: () => {
312
+          return []
313
+        }
314
+      },
315
+      bloodlines_info: {
316
+        type: Array,
317
+        default: () => {
318
+          return []
319
+        }
320
+      },
321
+      tubingHemodialysis_info: {
322
+        type: Array,
323
+        default: () => {
324
+          return []
325
+        }
326
+      },
327
+      safe_package_info: {
328
+        type: Array,
329
+        default: () => {
330
+          return []
331
+        }
332
+      },
333
+      aliquid_info: {
334
+        type: Array,
335
+        default: () => {
336
+          return []
337
+        }
338
+      },
339
+      headNurses: {
340
+        type: Array,
341
+        default: () => {
342
+          return []
343
+        }
344
+      },
345
+
346
+      config: {
347
+        type: Object,
348
+        default: () => {
349
+          return { id: 0 }
350
+        }
351
+      },
352
+
353
+      admin_user_map: { // {user_id: admin_user object}
354
+        type: Object,
355
+        default: () => {
356
+          return {}
357
+        }
358
+      },
359
+      device_map: { // {device_id: device object}
360
+        type: Object,
361
+        default: () => {
362
+          return {}
363
+        }
364
+      },
365
+      device_number_map: { // {device_number_id: device_number object}
366
+        type: Object,
367
+        default: () => {
368
+          return {}
369
+        }
370
+      },
371
+
372
+      last_predialysis_evaluation: { //最后一条透前
373
+        type: Object,
374
+        default: () => {
375
+          return { id: 0 }
376
+        }
377
+      },
378
+      last_monitor_record: { //最后一条监测记录
379
+        type: Object,
380
+        default: () => {
381
+          return { id: 0 }
382
+        }
383
+      },
384
+      last_assessment_after_dislysis: { //最后一条透后记录 (除了今天录的)
385
+        type: Object,
386
+        default: () => {
387
+          return { id: 0 }
388
+        }
389
+      }, last_dialysis_prescribe: { //最后一条透析处方(除了今天录的)
390
+        type: Object,
391
+        default: () => {
392
+          return { id: 0 }
393
+        }
394
+      }, last_dryWeight_dislysis: { //最后一条干体重 (除了今天录的)
395
+        type: Object,
396
+        default: () => {
397
+          return { id: 0 }
398
+        }
399
+      }, special_premission: {
400
+        type: Array,
401
+        default: () => {
402
+          return []
403
+        }
404
+      },
338 405
 
339
-      this.$emit("advice")
340
-    },
341
-    showMonitorDialog: function() {
342
-      this.$refs.monitor_dialog.show()
343
-    },
344
-    showAssessmentAfterDialog: function() {
345
-      this.$refs.assessment_after_dislysis.show()
346
-    },
347
-    showDoctorAdviceDialog: function() {
348
-      this.$refs.doctor_advice.show()
349
-    },
350
-    showComputerDialog: function() {
351
-      this.$refs.computer_dialog.show()
352
-    },
353
-    showFinishDialog: function() {
354
-      this.$refs.finish_dialog.show()
355
-    },
356
-    showPrescription: function() {
357
-      this.$refs.prescription.show()
358
-    },
359
-    showAccepts: function() {
360
-      this.$refs.accepts.show()
361
-    },
362
-    showAssessmentBefore: function() {
363
-      this.$refs.assessmentBefore.show()
364
-    },
365
-    showDoubleCheck: function() {
366
-      this.$refs.doubleCheck.show()
367 406
     },
368
-    showrTeatmentSummary: function() {
369
-      this.$refs.treatmentSummary.show()
407
+    methods: {
408
+      setLastRecord:function(lastPredialysisEvaluation,lastMonitorRecord,lastAssessmentAfterDislysis,lastDialysisPrescribe,lastDryWeightDislysis){
409
+           this.$refs.assessmentBefore.setLastRecord(lastPredialysisEvaluation,lastDryWeightDislysis)
410
+
411
+      },
412
+
413
+      add_monitor:function(monitor){
414
+
415
+
416
+        this.monitor_records.push(monitor)
417
+        this.monitor_records.sort((a, b) => b.operate_time - a.operate_time)
418
+        this.monitor_records.reverse()
419
+        this.$refs.monitor_dialog.setRecords(this.monitor_records)
420
+      },
421
+      adviceFunc: function() {
422
+
423
+        this.$emit('advice')
424
+      },
425
+      showMonitorDialog: function() {
426
+        this.$refs.monitor_dialog.show()
427
+      },
428
+      showAssessmentAfterDialog: function() {
429
+        this.$refs.assessment_after_dislysis.show()
430
+      },
431
+      showDoctorAdviceDialog: function() {
432
+        this.$refs.doctor_advice.show()
433
+      },
434
+      showComputerDialog: function() {
435
+        this.$refs.computer_dialog.show()
436
+      },
437
+      showFinishDialog: function() {
438
+        this.$refs.finish_dialog.show()
439
+      },
440
+      showPrescription: function() {
441
+        this.$refs.prescription.show()
442
+      },
443
+      showAccepts: function() {
444
+        this.$refs.accepts.show()
445
+      },
446
+      showAssessmentBefore: function() {
447
+        this.$refs.assessmentBefore.show()
448
+      },
449
+      showDoubleCheck: function() {
450
+        this.$refs.doubleCheck.show()
451
+      },
452
+      showrTeatmentSummary: function() {
453
+        this.$refs.treatmentSummary.show()
454
+      },assessmentAfterDislysisFunc:function(val) {
455
+        this.assessment_after_dislysis = val
456
+        this.$refs.assessment_after_dislysis.setRecords(this.assessment_after_dislysis)
457
+        this.$emit('assessmentAfterDislysis', this.assessment_after_dislysis)
458
+
459
+
460
+      }
370 461
     }
371 462
   }
372
-}
373 463
 </script>
374 464
 <style style="stylesheet/scss" lang="scss" scoped>
375 465
   .grid {

+ 59 - 88
src/xt_pages/dialysis/details/assessmentAfter.vue Wyświetl plik

@@ -16,7 +16,8 @@
16 16
         <li v-if="isShow('实际超滤量')">
17 17
           <label>实际超滤量: </label>
18 18
           <span class="content" v-if="actual_ultrafiltration!='0'">{{ actual_ultrafiltration }}</span>
19
-          <span class="unit" v-if="actual_ultrafiltration!='0'">ml</span>
19
+          <span class="unit" v-if="actual_ultrafiltration!='0'&& this.$store.getters.xt_user.template_info.template_id == 6">ml</span>
20
+          <span class="unit" v-if="actual_ultrafiltration!='0'&& this.$store.getters.xt_user.template_info.template_id != 6">L</span>
20 21
         </li>
21 22
         <li v-if="isShow('凝血')">
22 23
           <label>透析器凝血 : </label>
@@ -71,11 +72,11 @@
71 72
 
72 73
         <li v-if="isShow('并发症')">
73 74
           <label>并发症: </label>
74
-          <span class="content">{{ complication }}</span>
75
+          <span class="content">{{ this.record.complication }}</span>
75 76
         </li>
76 77
         <li v-if="isShow('压迫后内瘘震颤')">
77 78
           <label>压迫后内瘘震颤: </label>
78
-          <span class="content">{{ internal_fistula_tremor_ac_name }}</span>
79
+          <span class="content">{{ getInternal() }}</span>
79 80
         </li>
80 81
 
81 82
         <li v-if="isShow('交待病房护士/患者/陪人观察内容')&&patient_gose==3">
@@ -84,24 +85,24 @@
84 85
         </li>
85 86
         <li v-if="isShow('体温')">
86 87
           <label>体温 : </label>
87
-          <span class="content" v-if="temperature!='0'">{{ temperature }}</span>
88
-          <span class="unit" v-if="temperature!='0'">℃</span>
88
+          <span class="content" v-if="this.record.temperature">{{ this.record.temperature }}</span>
89
+          <span class="unit" v-if="this.record.temperature">℃</span>
89 90
         </li>
90 91
         <li v-if="isShow('脉率')">
91 92
           <label>脉率 : </label>
92
-          <span class="content" v-if="pulse_frequency!='0'">{{ pulse_frequency }}</span>
93
-          <span class="unit" v-if="pulse_frequency!='0'">次/分</span>
93
+          <span class="content" v-if="this.record.pulse_frequency">{{ this.record.pulse_frequency }}</span>
94
+          <span class="unit" v-if="this.record.pulse_frequency">次/分</span>
94 95
         </li>
95 96
         <li v-if="isShow('呼吸频率')">
96 97
           <label>呼吸频率 : </label>
97
-          <span class="content" v-if="breathing_rate !='0'">{{ breathing_rate }}</span>
98
-          <span class="unit" v-if="breathing_rate !='0'">次/min</span>
98
+          <span class="content" v-if="this.record.breathing_rate">{{ this.record.breathing_rate }}</span>
99
+          <span class="unit" v-if="this.record.breathing_rate">次/min</span>
99 100
         </li>
100 101
 
101 102
         <li v-if="isShow('实际治疗时长')">
102 103
           <label>实际治疗时长 : </label>
103
-          <span class="content" v-if="actual_treatment_hour!='0'">{{ actual_treatment_hour }}时</span>
104
-          <span class="content" v-if="actual_treatment_minute!='0'">{{ actual_treatment_minute }}分</span>
104
+          <span class="content" v-if="this.record.actual_treatment_hour">{{ this.record.actual_treatment_hour }}时</span>
105
+          <span class="content" v-if="this.record.actual_treatment_minute">{{ this.record.actual_treatment_minute }}分</span>
105 106
         </li>
106 107
         <li v-if="isShow('透析中入量')">
107 108
           <label>透析中入量: </label>
@@ -121,28 +122,25 @@
121 122
         </li>
122 123
         <li v-if="isShow('其他观察内容')&&patient_gose==3">
123 124
           <label>其他观察内容 : </label>
124
-          <span class="content">{{ observation_content_other }}</span>
125
-        </li>
126
-        <li v-if="isShow('拔针后穿刺点渗血')">
127
-          <label for="bzh">拔针后穿刺点渗血: </label>
128
-          <span id="bzh" class="content">{{puncture_point_oozing_blood_name}}</span>
125
+          <span class="content">{{observation_content_other }}</span>
129 126
         </li>
127
+
130 128
       </ul>
131 129
       <ul>
132 130
         <li v-if="isShow('透析过程')">
133 131
           <label for="tw">透析过程 : </label>
134 132
           <span class="content" id="tw" v-if="this.record.dialysis_process == 1">完成</span>
135
-          <span class="content" id="tw" v-if="this.record.dialysis_process == 2">提前{{in_advance_minute}}min</span>
133
+          <span class="content" id="tw" v-if="this.record.dialysis_process == 2">提前{{this.record.in_advance_minute}}min</span>
136 134
         </li>
137 135
         <li v-if="this.record.dialysis_process == 2&&isShow('透析过程提前原因')">
138 136
           <label for="tw">透析过程提前原因 : </label>
139
-          <span class="content" id="tw">{{in_advance_reason}}</span>
137
+          <span class="content" id="tw">{{this.record.in_advance_reason}}</span>
140 138
         </li>
141 139
 
142 140
 
143 141
         <li v-if="isShow('内瘘管拔针后压迫止血时间')">
144 142
           <label for="ml">内瘘管拔针后压迫止血时间 : </label>
145
-          <span id="ml" class="content" v-if="hemostasis_minute">{{hemostasis_minute}}min</span>
143
+          <span id="ml" class="content" v-if="this.record.hemostasis_minute">{{this.record.hemostasis_minute}}min</span>
146 144
           <span id="ml" class="content" v-else>-min</span>
147 145
         </li>
148 146
         <li v-if="isShow('内瘘管拔针后压迫止血操作')">
@@ -180,7 +178,7 @@
180 178
       </ul>
181 179
 
182 180
     </div>
183
-    <div class="note">备注 : <span>{{ remark }}</span></div>
181
+    <div class="note">备注 : <span>{{ this.record.remark }}</span></div>
184 182
     <div class="middleLine"></div>
185 183
   </div>
186 184
 </template>
@@ -192,15 +190,7 @@
192 190
     name: 'DialysisPrescription',
193 191
     data() {
194 192
       return {
195
-        title: '透后评估 ',
196
-        complication: '',
197
-        internal_fistula_tremor_ac_name:'',
198
-        temperature: '',
199
-        breathing_rate:'',
200
-        actual_treatment_hour:'',
201
-        actual_treatment_minute: '',
202
-        hemostasis_minute:'',
203
-        remark:''
193
+        title: '透后评估 '
204 194
       }
205 195
     },
206 196
     props: {
@@ -349,6 +339,7 @@
349 339
           return '-'
350 340
         }
351 341
         const vascular_access = this.$store.getters.vascular_access_desc
342
+        console.log(vascular_access)
352 343
         let name = '-'
353 344
         for (var index in vascular_access) {
354 345
           if (vascular_access[index].id == this.record.blood_access_part_opera_id) {
@@ -368,6 +359,17 @@
368 359
         if (this.record.id == 0) {
369 360
           return
370 361
         }
362
+        switch (this.record.puncture_point_haematoma) {
363
+          case 1:
364
+            return '有'
365
+            break
366
+          case 2:
367
+            return '无'
368
+            break
369
+          default:
370
+            return '-'
371
+            break
372
+        }
371 373
       }
372 374
     }, breathing_rate: function() {
373 375
       if (this.record.id == 0) {
@@ -415,42 +417,10 @@
415 417
     complication: function() {
416 418
       if (this.record.id == 0) {
417 419
         return '-'
418
-      } 
419
-      if(this.record.complication){
420
-        return this.record.complication
421
-      } else{
422
-        return '-'
423
-      }
424
-    },
425
-    internal_fistula_tremor_ac_name: function() {
426
-      if (this.record.id == 0) {
427
-        return '-'
428
-      }
429
-      switch (this.record.internal_fistula_tremor_ac) {
430
-        case 1:
431
-          return '存在'
432
-          break
433
-        case 2:
434
-          return '减弱'
435
-          break
436
-        case 3:
437
-          return '无'
438
-          break
439
-        default:
440
-          return '-'
441
-      }
442
-      switch (this.record.puncture_point_haematoma) {
443
-        case 1:
444
-          return '有'
445
-          break
446
-        case 2:
447
-          return '无'
448
-          break
449
-        default:
450
-          return '-'
451
-          break
452 420
       }
421
+      return this.record.complication
453 422
     },
423
+
454 424
     temperature: function() {
455 425
       if (this.record.id == 0) {
456 426
         return '-'
@@ -493,31 +463,13 @@
493 463
       }
494 464
       return this.record.observation_content
495 465
     },
496
-    // complication: function() {
497
-    //   if (this.record.id == 0) {
498
-    //     return '-'
499
-    //   }
500
-    //   return this.record.complication
501
-    // },
502
-    // internal_fistula_tremor_ac_name: function() {
503
-    //   if (this.record.id == 0) {
504
-    //     return '-'
505
-    //   }
506
-    //   switch (this.record.internal_fistula_tremor_ac) {
507
-    //     case 1:
508
-    //       return '存在'
509
-    //       break
510
-    //     case 2:
511
-    //       return '减弱'
512
-    //       break
513
-    //     case 3:
514
-    //       return '无'
515
-    //       break
516
-    //     default:
517
-    //       return '-'
518
-    //       break
519
-    //   }
520
-    // },
466
+    complication: function() {
467
+      if (this.record.id == 0) {
468
+        return '-'
469
+      }
470
+      return this.record.complication
471
+    },
472
+
521 473
 
522 474
     remark: function() {
523 475
       if (this.record.id == 0) {
@@ -551,6 +503,25 @@
551 503
       return this.record.in_advance_reason_other
552 504
     },
553 505
     methods: {
506
+      getInternal: function() {
507
+        if (this.record.id == 0) {
508
+          return '-'
509
+        }
510
+        switch (this.record.internal_fistula_tremor_ac) {
511
+          case 1:
512
+            return '存在'
513
+            break
514
+          case 2:
515
+            return '减弱'
516
+            break
517
+          case 3:
518
+            return '无'
519
+            break
520
+          default:
521
+            return '-'
522
+        }
523
+
524
+      },
554 525
       getOpera: function(id) {
555 526
         var hemostasis_opera = this.$store.getters.hemostasis_opera
556 527
         var hemostasisOperaName = ''

+ 18 - 9
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue Wyświetl plik

@@ -52,7 +52,10 @@
52 52
 
53 53
         <el-row :gutter="20"> -->
54 54
           <el-col :span="8" v-if="isShow('实际超滤量')">
55
-            <el-form-item label="实际超滤量(L): " >
55
+            <el-form-item label="实际超滤量(L): " v-if="this.template_id != 6" >
56
+              <el-input v-model="form.actual_ultrafiltration"></el-input>
57
+            </el-form-item>
58
+            <el-form-item label="实际超滤量(ml): " v-if="this.template_id == 6" >
56 59
               <el-input v-model="form.actual_ultrafiltration"></el-input>
57 60
             </el-form-item>
58 61
           </el-col>
@@ -61,14 +64,15 @@
61 64
               <el-input v-model="form.actual_displacement"></el-input>
62 65
             </el-form-item>
63 66
           </el-col>
67
+
68
+
69
+
70
+
64 71
           <el-col :span="8"  v-if="isShow('实际治疗时长')">
65 72
             <el-form-item label="实际治疗时长(时):">
66 73
               <!-- <el-input v-model="form.actual_treatment_hour"></el-input> -->
67 74
               <el-time-picker
68 75
                 v-model="actualTreatmentHourShow"
69
-                :picker-options="{
70
-                                        selectableRange: '00:01:00 - 23:59:00'
71
-                                    }"
72 76
                 placeholder="透析时长"
73 77
                 style="width:100%;"
74 78
                 value-format="H:m"
@@ -423,8 +427,7 @@ export default {
423 427
         loading: false,
424 428
         record_date: '',
425 429
         isVisibility: false,
426
-
427
-        actualTreatmentHourShow: new Date(2018, 1, 1, 3, 0),
430
+        template_id:0,
428 431
         cruorOptions: [],
429 432
         symptomsOptions: [],
430 433
         internalFistulaOptions: [],
@@ -433,6 +436,7 @@ export default {
433 436
           {id: 1, name: 'g'},
434 437
           {id: 2, name: 'ml'},
435 438
         ],
439
+        actualTreatmentHourShow:'',
436 440
         vascularAccessDescOptions: [],
437 441
         catheterOptions: [],
438 442
         complicationOptions: [],
@@ -758,6 +762,7 @@ export default {
758 762
 
759 763
       show() {
760 764
         this.isVisibility = true
765
+
761 766
       },
762 767
 
763 768
       hide() {
@@ -771,7 +776,12 @@ export default {
771 776
           }
772 777
         }
773 778
         return false
774
-      }
779
+      },  setRecords (records) {
780
+        for (var index in records) {
781
+          this.$set(this.assessment_after_dislysis, index, records[index])
782
+        }
783
+        this.actualTreatmentHourShow = new Date(2018, 1, 1, this.assessment_after_dislysis['actual_treatment_hour'], this.assessment_after_dislysis['actual_treatment_minute'])
784
+      },
775 785
     },
776 786
     created() {
777 787
       console.log('this.form', this.form)
@@ -785,8 +795,7 @@ export default {
785 795
       this.internalFistulaTremorAcOptions = this.$store.getters.internal_fistula_tremor_ac
786 796
       this.patientGoseOptions = this.$store.getters.patient_gose
787 797
       this.observationContentOptions = this.$store.getters.observation_content
788
-
789
-      console.log(this.patient)
798
+      this.template_id = this.$store.getters.xt_user.template_info.template_id;
790 799
 
791 800
       var date = this.$route.query && this.$route.query.date
792 801
       this.record_date = uParseTime(date, '{y}-{m}-{d}')

+ 174 - 0
src/xt_pages/dialysis/details/dialog/MsgTip.vue Wyświetl plik

@@ -0,0 +1,174 @@
1
+<template>
2
+  <el-dialog
3
+    :visible.sync="visibility"
4
+    width="500px"
5
+    :modal-append-to-body="false"
6
+    :append-to-body="true"
7
+  >
8
+    <div >
9
+      <div class="DialogTit">
10
+        <div class="back" @click="cancle()">
11
+          <span class="iconfont">&#xe720; </span>返回
12
+        </div>
13
+        <h1 class="name">
14
+          {{ patient_prop.name }} [透析号 {{ patient_prop.dialysis_no }} ]
15
+        </h1>
16
+        <span @click="comfirm" class="success" style="visibility: hidden;"
17
+        >确定</span>
18
+      </div>
19
+
20
+      <div class="DialogContent">
21
+        <div class="item">
22
+          <label class="name" for="txms">本次透析日期</label>
23
+          <div class="content">
24
+            <span class="text" id="txms"> {{ dialysis_date }}</span>
25
+          </div>
26
+        </div>
27
+        <div class="item">
28
+          <label class="name" for="txms">透前体重(kg)</label>
29
+          <div class="content">
30
+            <span class="text" id="txms">{{ predialysis.weight_before }}</span>
31
+          </div>
32
+        </div>
33
+        <div class="item">
34
+          <label class="name" for="txms">干体重(kg)</label>
35
+          <div class="content">
36
+            <span class="text" id="txms">{{ last_predialysis.dry_weight }}</span>
37
+          </div>
38
+        </div>
39
+        <div class="item">
40
+          <label class="name" for="txms">衣物重(kg)</label>
41
+          <div class="content">
42
+          <span class="text" id="txms">{{
43
+            predialysis.additional_weight
44
+          }}</span>
45
+          </div>
46
+        </div>
47
+        <div class="item">
48
+          <label class="name" for="txms">体重增加(kg)</label>
49
+          <div class="content">
50
+            <span class="text" id="txms">{{ add_weight }}</span>
51
+          </div>
52
+        </div>
53
+        <div class="item">
54
+          <label class="name" for="txms">透后体重(kg)</label>
55
+          <div class="content">
56
+            <span class="text" id="txms">{{ record.weight_after }}</span>
57
+          </div>
58
+        </div>
59
+        <div class="item">
60
+          <label class="name" for="txms">体重减少(kg)</label>
61
+          <div class="content">
62
+            <span class="text" id="txms">{{ record.weight_loss }}</span>
63
+          </div>
64
+        </div>
65
+        <div class="item">
66
+          <label class="name" for="txms">上次透后体重(kg)</label>
67
+          <div class="content">
68
+          <span class="text" id="txms">{{
69
+            last_record.weight_after
70
+          }}</span>
71
+          </div>
72
+        </div>
73
+      </div>
74
+    </div>
75
+  </el-dialog>
76
+</template>
77
+
78
+
79
+<script>
80
+  import { parseTime } from '@/utils'
81
+
82
+  export default {
83
+    name: 'MsgTip',
84
+    created() {
85
+      if (
86
+        this.predialysis.weight_before > 0 &&
87
+        this.last_record.weight_after > 0
88
+      ) {
89
+        this.add_weight = parseFloat(
90
+          this.predialysis.weight_before - this.last_record.weight_after
91
+        ).toFixed(2)
92
+      }
93
+    },
94
+    data() {
95
+      return {
96
+        result: [],
97
+        id: 0,
98
+        selectName: '',
99
+        add_weight: 0
100
+      }
101
+    },
102
+    props: {
103
+      predialysis: {
104
+        type: Object
105
+      },
106
+      visibility: {
107
+        type: Boolean,
108
+        default: false
109
+      },
110
+      last_predialysis: {
111
+        type: Object
112
+      },
113
+      record: {
114
+        type: Object
115
+      },
116
+      last_record: {
117
+        type: Object
118
+      },
119
+      patient_prop: {
120
+        type: Object
121
+      },
122
+      prescription_prop: {
123
+        type: Object
124
+      }
125
+    },
126
+    computed: {
127
+      dialysis_date: function() {
128
+        return parseTime(this.$route.query.date, '{y}/{m}/{d}')
129
+      }
130
+    },
131
+    methods: {
132
+      cancle: function() {
133
+        this.$emit('menu-msg-tip')
134
+      },
135
+      comfirm: function() {
136
+        this.$emit('menu-msg-tip')
137
+      },
138
+      getValue: function() {
139
+        let form = {}
140
+
141
+        let results = []
142
+
143
+        for (let i = 0; i < this.propsForm.list.length; i++) {
144
+          for (let a = 0; a < this.propsForm.result.length; a++) {
145
+            if (this.propsForm.list[i].id == this.propsForm.result[a]) {
146
+              results.push(this.propsForm.list[i])
147
+            }
148
+          }
149
+        }
150
+
151
+        var obj5 = {}
152
+        results = results.reduce((cur, next) => {
153
+          obj5[next.id] ? '' : (obj5[next.id] = true && cur.push(next))
154
+          return cur
155
+        }, [])
156
+
157
+        results
158
+
159
+        return results
160
+      }
161
+    },
162
+    watch: {
163
+      visibility(val) {
164
+        //初始化数据操作
165
+      }
166
+    }
167
+  }
168
+</script>
169
+
170
+<style  scoped>
171
+
172
+
173
+
174
+</style>

Plik diff jest za duży
+ 548 - 422
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue


+ 195 - 29
src/xt_pages/dialysis/details/dialog/computer_dialog.vue Wyświetl plik

@@ -2,28 +2,34 @@
2 2
   <div>
3 3
     <el-dialog title="透析上机" :visible.sync="visible" width="854px" :modal-append-to-body="false">
4 4
       <el-form :model="form" label-width="100px">
5
+
6
+        <el-form-item label="班次">
7
+          <el-select v-model="schedual_type" placeholder="请选择班次" @change="changeSchedualType">
8
+            <el-option v-for="(item, index) in schedules_type" :key="index" :value="item.id" :label="item.name" ></el-option>
9
+          </el-select>
10
+        </el-form-item>
11
+
5 12
         <el-form-item label="上机床位">
6
-          <el-select v-model="form.bed_id" placeholder="" :disabled="dialysis_order.id != 0">
13
+          <el-select v-model="form.bed_id" placeholder="请选择上机床位" >
7 14
             <el-option v-for="(bed, index) in zone_beds" :key="index" :value="bed.id" :label="bed.number"></el-option>
8 15
           </el-select>
9 16
         </el-form-item>
10 17
         <el-form-item label="上机护士">
11
-          <el-select v-model="form.nurse_id" placeholder="" :disabled="dialysis_order.id != 0">
18
+          <el-select v-model="form.nurse_id" placeholder="请选择上机护士" >
12 19
             <el-option v-for="(admin, index) in admins" :key="index" :value="admin.id" :label="admin.name"></el-option>
13 20
           </el-select>
14 21
         </el-form-item>
15 22
         <el-form-item label="穿刺护士">
16
-          <el-select v-model="form.puncture_nurse_id" placeholder="" :disabled="dialysis_order.id != 0">
23
+          <el-select v-model="form.puncture_nurse_id" placeholder="请选择穿刺护士" >
17 24
             <el-option v-for="(admin, index) in admins" :key="index" :value="admin.id" :label="admin.name"></el-option>
18 25
           </el-select>
19 26
         </el-form-item>
20 27
         <el-form-item label="引血(ml/min)" v-if="template_id == 6" >
21
-          <el-input type="number" v-model="form.lood_drawing" style="width:200px;"></el-input>
28
+          <el-input type="number" v-model="form.blood_drawing" style="width:200px;"></el-input>
22 29
         </el-form-item>
23
-    
30
+
24 31
         <el-form-item label="上机时间 :" style="width:300px">
25 32
           <el-date-picker
26
-            :disabled="dialysis_order.id != 0"
27 33
             type="datetime"
28 34
             format="yyyy-MM-dd HH:mm"
29 35
             value-format="yyyy-MM-dd HH:mm"
@@ -35,6 +41,8 @@
35 41
         <el-form-item>
36 42
           <el-button v-if="dialysis_order.id == 0" @click="submit" type="primary" :loading="loading">执行上机</el-button>
37 43
           <el-button v-else type="info" :disabled="true">已上机</el-button>
44
+          <el-button v-if="dialysis_order.id > 0 && (isPremission || this.$store.getters.xt_user.user.id == this.creator)" type="primary" @click="editOrder">修改上机</el-button>
45
+
38 46
         </el-form-item>
39 47
       </el-form>
40 48
     </el-dialog>
@@ -43,26 +51,35 @@
43 51
 </template>
44 52
 
45 53
 <script>
46
-  import { startDialysis } from '@/api/dialysis_record'
54
+  import { startDialysis,GetSchedualNumber,PostModifyStartDialysis } from '@/api/dialysis_record'
47 55
   import { parseTime } from '@/utils'
48 56
 
49 57
   export default {
50 58
     name: 'ComputerDialog',
51 59
     data() {
52 60
       return {
61
+        zone_beds:[],
53 62
         visible: false,
54 63
         loading: false,
55 64
         template_id: 0,
56 65
         patient_id: 0,
57 66
         schedule_date: 0,
58 67
         start_time: 0,
68
+        creator:0,
59 69
         form: {
60 70
           bed_id: '',
61 71
           nurse_id: '',
62 72
           start_time: '',
63 73
           puncture_nurse_id: '',
64
-          lood_drawing: 100
65
-        }
74
+          blood_drawing: 100
75
+        },
76
+        schedual_type:0,
77
+        schedules_type: [
78
+          {id: 1, name:"上午"},
79
+          {id: 2, name:"下午"},
80
+          {id: 3, name:"晚上"},
81
+        ], // 该排班的区里的床位
82
+        isPremission:false,
66 83
       }
67 84
     },
68 85
     props: {
@@ -77,29 +94,41 @@
77 94
       },
78 95
       device_numbers: {
79 96
         type: Array
80
-      }
97
+      },
98
+      special_premission: {
99
+        type: Array,
100
+      },
101
+    },mounted(){
102
+
103
+
104
+
105
+
81 106
     },
82 107
     created() {
108
+
83 109
       this.template_id = this.$store.getters.xt_user.template_info.template_id
84 110
       this.patient_id = this.$route.query.patient_id
85 111
       this.schedule_date = this.$route.query.date
86
-
87
-      this.form.bed_id = this.dialysis_order.id == 0 ? this.schedule.bed_id : this.dialysis_order.bed_id
88 112
       this.form.nurse_id = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id : this.dialysis_order.start_nurse
89 113
       this.form.puncture_nurse_id = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id : this.dialysis_order.puncture_nurse
90
-      this.form.lood_drawing = 0
91
-
92 114
       if (this.form.puncture_nurse_id == 0) {
93 115
         this.form.puncture_nurse_id = this.$store.getters.xt_user.user.id
94 116
       }
117
+
118
+
119
+
120
+
121
+
122
+
123
+
95 124
     },
96 125
     watch: {
97 126
       'schedule.id': function() {
98
-        this.form.bed_id = this.dialysis_order.id == 0 ? this.schedule.bed_id : this.dialysis_order.bed_id
99 127
       },
100 128
       'dialysis_order.id': function() {
101
-        console.log(this.dialysis_order)
102
-        this.form.bed_id = this.dialysis_order.id == 0 ? this.schedule.bed_id : this.dialysis_order.bed_id
129
+
130
+
131
+
103 132
         this.form.nurse_id = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id : this.dialysis_order.start_nurse
104 133
         this.form.puncture_nurse_id = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id : this.dialysis_order.puncture_nurse
105 134
 
@@ -117,21 +146,90 @@
117 146
           '-' +
118 147
           (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (nowHours < 10 ? '0' + nowHours : nowHours) + ':' + (nowMinutes < 10 ? '0' + nowMinutes : nowMinutes)
119 148
         this.form.start_time = this.dialysis_order.id == 0 ? time : this.getTime(this.dialysis_order.start_time, '{y}-{m}-{d} {h}:{i}')
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
120 157
       }
121 158
     },
122 159
     computed: {
123
-      zone_beds: function() {
124
-        var beds = []
125
-        for (let index = 0; index < this.device_numbers.length; index++) {
126
-          const device_number = this.device_numbers[index]
127
-          if (device_number.zone_id == this.schedule.partition_id) {
128
-            beds.push(device_number)
129
-          }
130
-        }
131
-        return beds
132
-      }
160
+      // zone_beds: function() {
161
+      //   var beds = []
162
+      //   for (let index = 0; index < this.device_numbers.length; index++) {
163
+      //     const device_number = this.device_numbers[index]
164
+      //     beds.push(device_number)
165
+      //   }
166
+      //   console.log(this.device_numbers)
167
+      //   return beds
168
+      // }
133 169
     },
134 170
     methods: {
171
+      changeSchedualType:function(schedual_type){
172
+        let ParamsQuery = {}
173
+        ParamsQuery['schedual_type'] = schedual_type
174
+        GetSchedualNumber(ParamsQuery).then(response => {
175
+          if (response.data.state == 0) {
176
+            return false
177
+          } else {
178
+            this.temp_device_numbers = response.data.data.number
179
+            for (let index = 0; index < this.temp_device_numbers.length; index++) {
180
+              const device_number = this.temp_device_numbers[index]
181
+              this.temp_device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
182
+            }
183
+            this.zone_beds = this.temp_device_numbers
184
+            this.form.bed_id = this.zone_beds[0].id
185
+
186
+          }
187
+        })
188
+
189
+      },
190
+      GetSchedualNumber:function(){
191
+        let ParamsQuery = {}
192
+        ParamsQuery['schedual_type'] = this.schedual_type
193
+        GetSchedualNumber(ParamsQuery).then(response => {
194
+          if (response.data.state == 0) {
195
+            this.$message.error(response.data.msg)
196
+            return false
197
+          } else {
198
+            this.temp_device_numbers = response.data.data.number
199
+            for (let index = 0; index < this.temp_device_numbers.length; index++) {
200
+              const device_number = this.temp_device_numbers[index]
201
+              this.temp_device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
202
+            }
203
+            this.zone_beds = this.temp_device_numbers
204
+
205
+            this.form.bed_id = this.dialysis_order.id == 0 ? this.schedule.bed_id : this.dialysis_order.bed_id
206
+            if(this.dialysis_order.id == 0) {
207
+              let isFilter = true
208
+              for (let i = 0; i < this.zone_beds.length; i++) {
209
+                if(this.zone_beds[i].id == this.schedule.bed_id ){
210
+                  isFilter = false
211
+
212
+                }
213
+              }
214
+              if(isFilter){
215
+                this.form.bed_id = this.zone_beds[0].id
216
+              }
217
+            }else{
218
+              for (let i = 0; i < this.device_numbers.length; i++){
219
+                if (this.device_numbers[i].id == this.dialysis_order.bed_id){
220
+                  let obj = {}
221
+                  obj = this.device_numbers[i]
222
+                  if(obj['number'].indexOf(this.device_numbers[i]['zone_name']) == -1) {
223
+                    obj['number'] = this.device_numbers[i]['zone_name'] + "-" + this.device_numbers[i]['number']
224
+                  }
225
+                  this.zone_beds.unshift(obj)
226
+                  this.zone_beds.sort((a, b) => a.id -b.id)
227
+                }
228
+              }
229
+            }
230
+          }
231
+        })
232
+      },
135 233
       getTime(value, temp) {
136 234
         if (value != undefined) {
137 235
           return parseTime(value, temp)
@@ -159,13 +257,51 @@
159 257
             '-' +
160 258
             (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (nowHours < 10 ? '0' + nowHours : nowHours) + ':' + (nowMinutes < 10 ? '0' + nowMinutes : nowMinutes)
161 259
         }
260
+
261
+        if (this.dialysis_order.id == 0) {
262
+          let now = new Date()
263
+          let hour = now.getHours()
264
+          if (hour >= 6 && hour < 12){
265
+            this.schedual_type = 1
266
+
267
+          }else if(hour >= 12 && hour < 18){
268
+
269
+            this.schedual_type = 2
270
+
271
+
272
+          }else if(hour >= 18){
273
+            this.schedual_type = 3
274
+          }
275
+        } else {
276
+
277
+          this.schedual_type = this.dialysis_order.schedual_type
278
+        }
279
+
280
+
281
+        if (this.dialysis_order.id > 0) {
282
+          for (let i = 0; i < this.special_premission.length; i++) {
283
+            if (this.$store.getters.xt_user.user.id == this.special_premission[i].admin_user_id) {
284
+              this.isPremission = true
285
+            }
286
+          }
287
+        }
288
+
289
+        if (this.dialysis_order.id > 0) {
290
+          if (this.dialysis_order.creator == 0) {
291
+            this.creator = this.dialysis_order.start_nurse
292
+          } else {
293
+            this.creator = this.dialysis_order.creator
294
+          }
295
+        }
296
+
297
+        this.GetSchedualNumber()
162 298
       },
163 299
       hide: function() {
164 300
         this.visible = false
165 301
       },
166 302
       submit: function() {
167 303
         this.loading = true
168
-        startDialysis(this.patient_id, parseTime(this.schedule_date, '{y}-{m}-{d}'), this.form.nurse_id, this.form.bed_id, this.form.lood_drawing, this.form.puncture_nurse_id, this.form.start_time).then(rs => {
304
+        startDialysis(this.patient_id, parseTime(this.schedule_date, '{y}-{m}-{d}'), this.form.nurse_id, this.form.bed_id, this.form.lood_drawing, this.form.puncture_nurse_id, this.form.start_time,this.schedual_type).then(rs => {
169 305
           this.loading = false
170 306
           var resp = rs.data
171 307
           if (resp.state == 1) {
@@ -174,11 +310,41 @@
174 310
             for (const key in resp_dialysis_order) {
175 311
               this.$set(this_order, key, resp_dialysis_order[key])
176 312
             }
313
+            this.hide()
314
+            this.$emit('monitor',  resp.data.monitor)
315
+            this.$message.success("上机成功")
316
+
177 317
           } else {
178 318
             this.$message.error(resp.msg)
179 319
           }
180 320
         })
181
-      }
321
+      }, editOrder(){
322
+        let ParamsQuery = {}
323
+        ParamsQuery['schedual_type'] = this.schedual_type
324
+        ParamsQuery['id'] = this.dialysis_order.id
325
+        ParamsQuery['nurse'] = this.form.nurse_id
326
+        ParamsQuery['bed'] = this.form.bed_id
327
+        ParamsQuery['start_time'] =  this.form.start_time
328
+        ParamsQuery['puncture_nurse'] = this.form.puncture_nurse_id
329
+        PostModifyStartDialysis(ParamsQuery).then(rs => {
330
+          var resp = rs.data
331
+          if (resp.state == 1) {
332
+            this.$message.success("修改成功")
333
+
334
+            var resp_dialysis_order = resp.data.dialysis_order
335
+            var this_order = this.dialysis_order
336
+            for (const key in resp_dialysis_order) {
337
+              this.$set(this_order, key, resp_dialysis_order[key])
338
+              this.$emit('assessmentAfterDislysis', resp.data.after)
339
+
340
+            }
341
+
342
+          } else {
343
+            this.$message.error(resp.msg)
344
+          }
345
+        })
346
+      },
347
+
182 348
     }
183 349
   }
184 350
 </script>

+ 364 - 71
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Wyświetl plik

@@ -7,16 +7,17 @@
7 7
       :modal-append-to-body="false"
8 8
       :append-to-body="true"
9 9
     >
10
-      <el-button @click="handlePatientInfo">{{patient.name}}</el-button>
10
+      <el-button style="position: absolute;left: 12%;top: 2%" @click="handlePatientInfo">{{patient.name}}</el-button>
11 11
 
12 12
       <el-form ref="dialysisPrescription" :model="dialysisPrescription" label-width="148px">
13 13
         <el-row :gutter="24">
14 14
           <el-col :span="8" v-if="isShows('透析模式')">
15 15
             <el-form-item label="透析模式">
16
-              <el-select v-model="dialysisPrescription.mode_id" @change="changePrescription(dialysisPrescription.mode_id)" >
16
+              <el-select v-model="dialysisPrescription.mode_id"
17
+                         @change="changePrescription(dialysisPrescription.mode_id)">
17 18
                 <el-option :key="0" label="请选择" :value="0"></el-option>
18
-                <el-option v-for="item in treatment_mode" :label="item.name" :value="item.id"
19
-                           :key="item.id"></el-option>
19
+                <el-option v-for="(item,index) in treatment_mode" :label="item.name" :value="item.id"
20
+                           :key="index+1"></el-option>
20 21
               </el-select>
21 22
             </el-form-item>
22 23
           </el-col>
@@ -52,7 +53,7 @@
52 53
               <!-- <el-input type="number" v-model="dialysisPrescription.dialysate_formulation"></el-input> -->
53 54
               <el-select v-model="dialysisPrescription.dialysate_formulation" placeholder="请选择">
54 55
                 <el-option :key="0" label="请选择" :value="0"></el-option>
55
-                <el-option v-for="(option, index) in dialysate_formulation_options" :key="index" :label="option.name"
56
+                <el-option v-for="(option, index) in dialysate_formulation_options" :key="index+1" :label="option.name"
56 57
                            :value="option.id"></el-option>
57 58
               </el-select>
58 59
             </el-form-item>
@@ -69,11 +70,6 @@
69 70
           </el-col>
70 71
 
71 72
 
72
-          <el-col :span="8" v-if="isShows('置换量')" v-show="zhiShow">
73
-            <el-form-item label="置换量(L):">
74
-              <el-input type="number" v-model="dialysisPrescription.replacement_total"></el-input>
75
-            </el-form-item>
76
-          </el-col>
77 73
 
78 74
           <el-col :span="8" v-if="isShows('抗凝剂')">
79 75
             <el-form-item label="抗凝剂:">
@@ -81,7 +77,7 @@
81 77
                          @change="changeThisAnticoagulant">
82 78
                 <el-option :key="0" label="请选择" :value="0"></el-option>
83 79
 
84
-                <el-option v-for="item in anticoagulantsConfit" :label="item.name" :key="item.id"
80
+                <el-option v-for="(item,index) in anticoagulantsConfit" :label="item.name" :key="index + 1"
85 81
                            :value="item.id"></el-option>
86 82
               </el-select>
87 83
             </el-form-item>
@@ -90,22 +86,26 @@
90 86
 
91 87
           <el-col :span="8" v-if="anticoagulant.shouji != -1&&isShows('首剂')">
92 88
             <el-form-item :label="'首剂('+anticoagulant.shouji_unit+') : '">
93
-              <el-input type="number" v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
94
-            </el-form-item>
95
-
89
+              <el-input type="number"  v-if="dialysisPrescription.anticoagulant != 1"  v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
90
+              <el-input type="number" disabled   v-if="dialysisPrescription.anticoagulant == 1" v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
96 91
 
92
+            </el-form-item>
97 93
           </el-col>
98 94
 
95
+
99 96
           <el-col :span="8" v-if="anticoagulant.weichi != -1&&isShows('维持')">
100 97
             <el-form-item :label="'维持('+anticoagulant.weichi_unit+') : '" v-if="anticoagulant.weichi != -1">
101
-              <el-input type="number" v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
98
+              <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"  v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
99
+              <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"  v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
100
+
102 101
             </el-form-item>
103 102
           </el-col>
104 103
 
105
-
106 104
           <el-col :span="8" v-if="anticoagulant.zongliang != -1&&isShows('总量')">
107 105
             <el-form-item :label="'总量('+anticoagulant.zongliang_unit+') : '">
108
-              <el-input type="number" v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
106
+              <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1" v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
107
+              <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1" v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
108
+
109 109
             </el-form-item>
110 110
           </el-col>
111 111
 
@@ -117,17 +117,18 @@
117 117
             </el-form-item>
118 118
           </el-col>
119 119
           <el-col :span="8" v-if="anticoagulant.gaijiliang != -1&&isShows('钙剂量')">
120
-            <el-form-item label="钙剂量(ml/h) : ">
120
+            <el-form-item label="钙剂量(ml) : ">
121 121
               <el-input type="number" v-model="dialysisPrescription.anticoagulant_gaijiliang"
122 122
                         :disabled="anticoagulant.gaijiliang==1?false:true" placeholder="钙剂量"></el-input>
123 123
             </el-form-item>
124 124
           </el-col>
125 125
 
126
+          <el-col :span="8" v-if="isShows('置换量')" v-show="zhiShow">
127
+            <el-form-item label="置换量(L):">
128
+              <el-input type="number" v-model="dialysisPrescription.replacement_total"></el-input>
129
+            </el-form-item>
130
+          </el-col>
126 131
 
127
-          <!-- </el-row>
128
-
129
-
130
-          <el-row :gutter="20"> -->
131 132
 
132 133
           <el-col :span="8" v-if="isShows('钾')">
133 134
             <el-form-item label="钾(mmol/L): ">
@@ -149,9 +150,6 @@
149 150
           </el-col>
150 151
 
151 152
 
152
-          <!-- </el-row>
153
-
154
-          <el-row :gutter="20"> -->
155 153
 
156 154
           <el-col :span="8" v-if="isShows('透析器/灌流器')">
157 155
             <el-form-item label="透析器/灌流器:">
@@ -189,7 +187,7 @@
189 187
               >
190 188
                 <el-option :key="0" label="请选择" :value="0"></el-option>
191 189
 
192
-                <el-option v-for="item in body_fluid_option" :label="item.name" :key="item.id"
190
+                <el-option v-for="(item,index) in body_fluid_option" :label="item.name" :key="index+1"
193 191
                            :value="item.id"></el-option>
194 192
               </el-select>
195 193
             </el-form-item>
@@ -214,7 +212,7 @@
214 212
               >
215 213
                 <el-option :key="0" label="请选择" :value="0"></el-option>
216 214
 
217
-                <el-option v-for="item in special_medicine_option" :label="item.name" :key="item.id"
215
+                <el-option v-for="(item,index) in special_medicine_option" :label="item.name" :key="index+1"
218 216
                            :value="item.id"></el-option>
219 217
               </el-select>
220 218
             </el-form-item>
@@ -231,19 +229,21 @@
231 229
 
232 230
           <el-row :gutter="20" > -->
233 231
           <el-col :span="8">
234
-            <el-form-item label="置换液:" v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id != 6" v-show="huShow">
232
+            <el-form-item label="置换液:" v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id != 6"
233
+                          v-show="huShow">
235 234
               <el-select v-model="dialysisPrescription.displace_liqui_part" placeholder="请选择">
236 235
                 <el-option :key="0" label="请选择" :value="0"></el-option>
237
-                <el-option v-for="(option, index) in displace_liqui_part_option" :key="index"
236
+                <el-option v-for="(option, index) in displace_liqui_part_option" :key="index+1"
238 237
                            :label="option.name" :value="option.id"></el-option>
239 238
               </el-select>
240 239
             </el-form-item>
241 240
 
242 241
 
243
-            <el-form-item label="置换方式:" v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id == 6">
242
+            <el-form-item label="置换方式:"
243
+                          v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id == 6">
244 244
               <el-select v-model="dialysisPrescription.displace_liqui_part" placeholder="请选择">
245 245
                 <el-option :key="0" label="请选择" :value="0"></el-option>
246
-                <el-option v-for="(option, index) in displace_liqui_part_option" :key="index"
246
+                <el-option v-for="(option, index) in displace_liqui_part_option" :key="index+1"
247 247
                            :label="option.name" :value="option.id"></el-option>
248 248
               </el-select>
249 249
             </el-form-item>
@@ -262,7 +262,7 @@
262 262
               <el-select v-model="dialysisPrescription.blood_access" placeholder="请选择">
263 263
                 <el-option :key="0" label="请选择" :value="0"></el-option>
264 264
 
265
-                <el-option v-for="(option, index) in blood_access_option" :key="index"
265
+                <el-option v-for="(option, index) in blood_access_option" :key="index+1"
266 266
                            :label="option.name" :value="option.id"></el-option>
267 267
               </el-select>
268 268
             </el-form-item>
@@ -289,7 +289,7 @@
289 289
             <el-form-item label="血液透析干粉:">
290 290
               <el-select v-model="dialysisPrescription.niprocart" placeholder="请选择">
291 291
                 <el-option :key="0" label="请选择" :value="0"></el-option>
292
-                <el-option v-for="(option, index) in niprocart_info" :key="index"
292
+                <el-option v-for="(option, index) in niprocart_info" :key="index+1"
293 293
                            :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
294 294
               </el-select>
295 295
             </el-form-item>
@@ -301,7 +301,7 @@
301 301
               <el-select v-model="dialysisPrescription.jms" placeholder="请选择">
302 302
                 <el-option :key="0" label="请选择" :value="0"></el-option>
303 303
 
304
-                <el-option v-for="(option, index) in jms_info" :key="index"
304
+                <el-option v-for="(option, index) in jms_info" :key="index+1"
305 305
                            :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
306 306
               </el-select>
307 307
             </el-form-item>
@@ -313,7 +313,7 @@
313 313
               <el-select v-model="dialysisPrescription.fistula_needle_set" placeholder="请选择">
314 314
                 <el-option :key="0" label="请选择" :value="0"></el-option>
315 315
 
316
-                <el-option v-for="(option, index) in fistula_needle_set_info" :key="index"
316
+                <el-option v-for="(option, index) in fistula_needle_set_info" :key="index+1"
317 317
                            :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
318 318
               </el-select>
319 319
             </el-form-item>
@@ -325,7 +325,7 @@
325 325
               <el-select v-model="dialysisPrescription.fistula_needle_set_16" placeholder="请选择">
326 326
                 <el-option :key="0" label="请选择" :value="0"></el-option>
327 327
 
328
-                <el-option v-for="(option, index) in fistula_needle_set_16_info" :key="index"
328
+                <el-option v-for="(option, index) in fistula_needle_set_16_info" :key="index+1"
329 329
                            :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
330 330
               </el-select>
331 331
             </el-form-item>
@@ -337,7 +337,7 @@
337 337
               <el-select v-model="dialysisPrescription.hemoperfusion" placeholder="请选择">
338 338
                 <el-option :key="0" label="请选择" :value="0"></el-option>
339 339
 
340
-                <el-option v-for="(option, index) in hemoperfusion_info" :key="index"
340
+                <el-option v-for="(option, index) in hemoperfusion_info" :key="index+1"
341 341
                            :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
342 342
               </el-select>
343 343
             </el-form-item>
@@ -349,7 +349,7 @@
349 349
               <el-select v-model="dialysisPrescription.dialyser_sterilised" placeholder="请选择">
350 350
                 <el-option :key="0" label="请选择" :value="0"></el-option>
351 351
 
352
-                <el-option v-for="(option, index) in dialyser_sterilised_info" :key="index"
352
+                <el-option v-for="(option, index) in dialyser_sterilised_info" :key="index+1"
353 353
                            :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
354 354
               </el-select>
355 355
             </el-form-item>
@@ -361,7 +361,7 @@
361 361
               <el-select v-model="dialysisPrescription.filtryzer" placeholder="请选择">
362 362
                 <el-option :key="0" label="请选择" :value="0"></el-option>
363 363
 
364
-                <el-option v-for="(option, index) in filtryzer_info" :key="index"
364
+                <el-option v-for="(option, index) in filtryzer_info" :key="index+1"
365 365
                            :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
366 366
               </el-select>
367 367
             </el-form-item>
@@ -373,7 +373,7 @@
373 373
               <el-select v-model="dialysisPrescription.dialyzers" placeholder="请选择">
374 374
                 <el-option :key="0" label="请选择" :value="0"></el-option>
375 375
 
376
-                <el-option v-for="(option, index) in dialyzers_info" :key="index"
376
+                <el-option v-for="(option, index) in dialyzers_info" :key="index+1"
377 377
                            :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
378 378
               </el-select>
379 379
             </el-form-item>
@@ -385,7 +385,7 @@
385 385
               <el-select v-model="dialysisPrescription.injector" placeholder="请选择">
386 386
                 <el-option :key="0" label="请选择" :value="0"></el-option>
387 387
 
388
-                <el-option v-for="(option, index) in injector_info" :key="index"
388
+                <el-option v-for="(option, index) in injector_info" :key="index+1"
389 389
                            :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
390 390
               </el-select>
391 391
             </el-form-item>
@@ -397,7 +397,7 @@
397 397
               <el-select v-model="dialysisPrescription.bloodlines" placeholder="请选择">
398 398
                 <el-option :key="0" label="请选择" :value="0"></el-option>
399 399
 
400
-                <el-option v-for="(option, index) in bloodlines_info" :key="index"
400
+                <el-option v-for="(option, index) in bloodlines_info" :key="index+1"
401 401
                            :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
402 402
               </el-select>
403 403
             </el-form-item>
@@ -409,7 +409,7 @@
409 409
               <el-select v-model="dialysisPrescription.tubing_hemodialysis" placeholder="请选择">
410 410
                 <el-option :key="0" label="请选择" :value="0"></el-option>
411 411
 
412
-                <el-option v-for="(option, index) in tubingHemodialysis_info" :key="index"
412
+                <el-option v-for="(option, index) in tubingHemodialysis_info" :key="index+1"
413 413
                            :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
414 414
               </el-select>
415 415
             </el-form-item>
@@ -421,7 +421,7 @@
421 421
               <el-select v-model="dialysisPrescription.package" placeholder="请选择">
422 422
                 <el-option :key="0" label="请选择" :value="0"></el-option>
423 423
 
424
-                <el-option v-for="(option, index) in safe_package_info" :key="index"
424
+                <el-option v-for="(option, index) in safe_package_info" :key="index+1"
425 425
                            :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
426 426
               </el-select>
427 427
             </el-form-item>
@@ -433,7 +433,7 @@
433 433
               <el-select v-model="dialysisPrescription.a_liquid" placeholder="请选择">
434 434
                 <el-option :key="0" label="请选择" :value="0"></el-option>
435 435
 
436
-                <el-option v-for="(option, index) in aliquid_info" :key="index"
436
+                <el-option v-for="(option, index) in aliquid_info" :key="index+1"
437 437
                            :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
438 438
               </el-select>
439 439
             </el-form-item>
@@ -469,7 +469,7 @@
469 469
     >
470 470
 
471 471
       <el-checkbox-group v-model="checkedCities">
472
-        <el-checkbox style="display:block;vertical-align: middle" v-for="(advice, index) in targetAdvices"
472
+        <el-checkbox  style="display: flex;align-items: center" v-for="(advice, index) in targetAdvices"
473 473
                      :label="advice.id"
474 474
                      :key="index"
475 475
                      :value="advice.id"
@@ -479,7 +479,7 @@
479 479
           <div style="padding-left: 10px">开嘱时间&nbsp;{{ getTime(advice.created_time) }}</div>
480 480
           <br/>
481 481
           <div style="padding-bottom: 10px;padding-left: 10px"> 医嘱内容&nbsp;{{getContent(advice)}}</div>
482
-          <div style="padding-bottom: 10px;padding-left: 10px" v-if="advice.frequency_type == 1"> 推送频率 每必推</div>
482
+          <div style="padding-bottom: 10px;padding-left: 10px" v-if="advice.frequency_type == 1"> 推送频率 每必推</div>
483 483
           <div style="padding-bottom: 10px;padding-left: 10px" v-if="advice.frequency_type == 2"> 推送频率&nbsp;{{advice.day_count}}天/次</div>
484 484
           <div style="padding-bottom: 10px;padding-left: 10px" v-if="advice.frequency_type == 3"> 推送频率&nbsp;每周{{advice.week_day}}</div>
485 485
         </el-checkbox>
@@ -493,22 +493,70 @@
493 493
     </el-dialog>
494 494
 
495 495
 
496
+    <el-dialog
497
+      :title="patient.name"
498
+      :visible.sync="msgtip_visibility"
499
+      :close-on-click-modal="false"
500
+      :close-on-press-escape="false"
501
+      :show-close="false"
502
+      width="30%"
503
+    >
504
+      <div class="newLine">
505
+        <span>本次透析日期</span>
506
+        <span>{{dialysis_date}}</span>
507
+      </div>
508
+      <div class="newLine">
509
+        <span>透前体重(kg)</span>
510
+        <span>{{ predialysis.weight_before }}</span>
511
+      </div>
512
+      <div class="newLine">
513
+        <span>干体重(kg)</span>
514
+        <span>{{ last_predialysis?last_predialysis.dry_weight:''}}</span>
515
+      </div>
516
+      <div class="newLine">
517
+        <span>衣物重(kg)</span>
518
+        <span>{{
519
+            predialysis.additional_weight
520
+          }}</span>
521
+      </div>
522
+      <div class="newLine">
523
+        <span>体重增加(kg)</span>
524
+        <span>{{ add_weight }}</span>
525
+      </div>
526
+      <div class="newLine">
527
+        <span>透后体重(kg)</span>
528
+        <span>{{ record.weight_after }}</span>
529
+      </div>
530
+      <div class="newLine">
531
+        <span>体重减少(kg)</span>
532
+        <span>{{ record.weight_loss }}</span>
533
+      </div>
534
+      <div class="newLine">
535
+        <span>上次透后体重(kg)</span>
536
+        <span>{{last_record?last_record.weight_after:''}}</span>
537
+      </div>
496 538
 
497
-
498
-
539
+      <span slot="footer" class="dialog-footer">
540
+            <el-button @click="cancleMsg()">取 消</el-button>
541
+            <el-button type="primary" @click="cancleMsg()">确 定</el-button>
542
+          </span>
543
+    </el-dialog>
499 544
 
500 545
   </div>
501 546
 
502 547
 </template>
503 548
 
504 549
 <script>
505
-  import { postPrescription, postSoulution, CreateGroupAdvice } from '@/api/dialysis'
550
+  import { CreateGroupAdvice, GetSolution, postPrescription, postSoulution } from '@/api/dialysis'
506 551
   import { getDataConfig } from '@/utils/data'
507 552
   import { uParseTime } from '@/utils/tools'
508 553
   import store from '@/store'
554
+  import MsgTip from './MsgTip'
555
+  import { calculateAnticoagulantZL} from '@/utils/tools'
509 556
 
510 557
   export default {
511 558
     name: 'dialysisPrescriptionDialog',
559
+    components: { MsgTip },
512 560
     props: {
513 561
       is_open: {
514 562
         type: Number,
@@ -627,6 +675,7 @@
627 675
         }
628 676
       },
629 677
 
678
+
630 679
       prescription: { // 透析处方
631 680
         type: Object,
632 681
         default: () => {
@@ -660,13 +709,49 @@
660 709
           return new Array()
661 710
         }
662 711
       },
663
-      zhiShow: false,
664
-      totalShow: false,
665
-      huShow: false
666 712
 
713
+      predialysis: {
714
+        type: Object,
715
+        default: () => {
716
+          return { id: 0 }
717
+        }
718
+      },
719
+      last_predialysis: {
720
+        type: Object,
721
+        default: () => {
722
+          return { id: 0 }
723
+        }
724
+      },
725
+      record: {
726
+        type: Object,
727
+        default: () => {
728
+          return { id: 0 }
729
+        }
730
+      },
731
+      last_record: {
732
+        type: Object,
733
+        default: () => {
734
+          return { id: 0 }
735
+        }
736
+      }, dry_weight: {
737
+        type: Object,
738
+        default: () => {
739
+          return { id: 0 }
740
+        }
741
+      },
742
+
743
+    },
744
+    computed: {
745
+      dialysis_date: function() {
746
+        return uParseTime(this.$route.query.date, '{y}/{m}/{d}')
747
+      }
667 748
     },
668 749
     data() {
669 750
       return {
751
+        zhiShow: false,
752
+        totalShow: false,
753
+        huShow: false,
754
+        showName:'',
670 755
         isShowRemindAdvice: false,
671 756
         checkedCities: [],
672 757
         isVisibility: false,
@@ -676,16 +761,19 @@
676 761
         record_date: '',
677 762
         time: '',
678 763
         treatment_mode: [],
764
+        timeValue: '',
679 765
         deviceList: [],
680 766
         replacement_ways: [],
681 767
         anticoagulantsConfit: {},
682 768
         dialysate_formulation_options: [],
683
-
769
+        add_weight:0,
684 770
         body_fluid_option: [],
685 771
         special_medicine_option: [],
686 772
         displace_liqui_part_option: [],
687 773
         blood_access_option: [],
688 774
         is_pre: 0,
775
+        msgtip_visibility: false,
776
+
689 777
         dialysisPrescription: {
690 778
           replacement_total: '',
691 779
           mode_id: '',
@@ -742,7 +830,15 @@
742 830
           bloodlines: '',
743 831
           tubing_hemodialysis: '',
744 832
           package: '',
745
-          a_liquid: ''
833
+          a_liquid: '',
834
+
835
+
836
+          no_anticoagulant_shouji: '0',
837
+          no_anticoagulant_weichi: '0',
838
+          no_anticoagulant_zongliang: '0',
839
+
840
+
841
+
746 842
         },
747 843
 
748 844
         anticoagulant: {
@@ -766,6 +862,10 @@
766 862
       }
767 863
     },
768 864
     methods: {
865
+      menuMsgTip: function() {
866
+        this.msgtip_visibility = false
867
+        this.isVisibility = true
868
+      },
769 869
       handleAdviceCommit() {
770 870
         let results = []
771 871
         for (let i = 0; i < this.targetAdvices.length; i++) {
@@ -1781,22 +1881,67 @@
1781 1881
               val.child[i]['single'] = ''
1782 1882
             }
1783 1883
             name = name + '▲' + val.child[i].advice_name + '' +
1784
-            val.child[i].advice_desc +
1785
-            val.child[i].drug_spec_unit +
1786
-            val.child[i].presc +
1787
-            val.child[i].single
1884
+              val.child[i].advice_desc +
1885
+              val.child[i].drug_spec_unit +
1886
+              val.child[i].presc +
1887
+              val.child[i].single
1788 1888
           }
1789 1889
           return val.advice_name + '  ' + advice_desc + ' ' +
1790
-          val.drug_spec_unit +
1791
-          prescribing_number +
1792
-          ' ' + single_dose + ' ' + ' ' + val.delivery_way + ' ' + val.execution_frequency + val.remark + name
1890
+            val.drug_spec_unit +
1891
+            prescribing_number +
1892
+            ' ' + single_dose + ' ' + ' ' + val.delivery_way + ' ' + val.execution_frequency + val.remark + name
1793 1893
         } else {
1794 1894
           return val.advice_name + '  ' + advice_desc +
1795
-          prescribing_number +
1796
-          ' ' + single_dose + ' ' + ' ' + val.delivery_way + ' ' + val.execution_frequency + val.remark
1895
+            prescribing_number +
1896
+            ' ' + single_dose + ' ' + ' ' + val.delivery_way + ' ' + val.execution_frequency + val.remark
1797 1897
         }
1798 1898
       },
1799 1899
       changePrescription(id) {
1900
+
1901
+        let ParamsQuery = {}
1902
+        ParamsQuery['patient_id'] = this.$route.query.patient_id
1903
+        ParamsQuery['mode_id'] = id
1904
+        GetSolution(ParamsQuery).then(response => {
1905
+          if (response.data.state == 0) {
1906
+            this.$message.error(response.data.msg)
1907
+            return false
1908
+          } else {
1909
+            this.$message.success('切换成功')
1910
+            if (response.data.data.solution != null) {
1911
+              for (const key in response.data.data.solution) { //长期处方不为空
1912
+                if (key != 'target_ultrafiltration') {
1913
+                  this.dialysisPrescription[key] = response.data.data.solution[key]
1914
+                }
1915
+              }
1916
+            } else {
1917
+              if (response.data.data.prescription != null) {  //临时处方不为空
1918
+                for (const key in response.data.data.prescription) {
1919
+                  if (key != 'target_ultrafiltration') {
1920
+                    this.dialysisPrescription[key] = response.data.data.prescription[key]
1921
+                  }
1922
+                }
1923
+              } else {
1924
+                for (const key in this.dialysisPrescription) { //临时处方为空
1925
+                  if (key != 'target_ultrafiltration') {
1926
+                    this.dialysisPrescription[key] = ''
1927
+                  }
1928
+                }
1929
+                this.dialysisPrescription.mode_id = id
1930
+              }
1931
+            }
1932
+          }
1933
+
1934
+          if (this.dialysisPrescription.dialysis_duration_hour === '' || this.dialysisPrescription.dialysis_duration_minute === '') {
1935
+            this.timeValue = ''
1936
+            this.time = '03:00'
1937
+
1938
+          } else {
1939
+
1940
+            this.timeValue = this.dialysisPrescription.dialysis_duration_hour + '小时' + this.dialysisPrescription.dialysis_duration_minute + '分钟'
1941
+            this.time = (this.dialysisPrescription.dialysis_duration_hour > 10 ? this.dialysisPrescription.dialysis_duration_hour : '0' + this.dialysisPrescription.dialysis_duration_hour) + ':' + (this.dialysisPrescription.dialysis_duration_minute > 10 ? this.dialysisPrescription.dialysis_duration_minute : '0' + this.dialysisPrescription.dialysis_duration_minute)
1942
+          }
1943
+        })
1944
+
1800 1945
         if (id === 1 || id === 3 || id === 4 || id === 6 || id === 7 || id === 8 || id === 9 || id === 10 || id === 11 || id === 13 || id === 14 || id === 15 || id === 16) {
1801 1946
           this.zhiShow = false
1802 1947
           this.huShow = false
@@ -1806,14 +1951,26 @@
1806 1951
           this.huShow = true
1807 1952
           this.totalShow = true
1808 1953
         }
1809
-      },handlePatientInfo(){
1810
-
1811
-
1812
-
1954
+      }, handlePatientInfo() {
1955
+        this.isVisibility = false
1956
+        this.msgtip_visibility = true
1957
+      },cancleMsg(){
1813 1958
 
1959
+        this.isVisibility = true
1960
+        this.msgtip_visibility = false
1814 1961
       }
1815 1962
     },
1816 1963
     created() {
1964
+
1965
+
1966
+      if (
1967
+        this.predialysis.weight_before > 0 &&
1968
+        this.last_record.weight_after > 0
1969
+      ) {
1970
+        this.add_weight = parseFloat(
1971
+          this.predialysis.weight_before - this.last_record.weight_after
1972
+        ).toFixed(2)
1973
+      }
1817 1974
       this.treatment_mode = this.$store.getters.treatment_mode
1818 1975
       this.perfusion_apparatus = getDataConfig('hemodialysis', 'perfusion_apparatus')
1819 1976
       this.replacement_ways = getDataConfig('hemodialysis', 'replacement_ways')
@@ -1830,10 +1987,137 @@
1830 1987
       this.record_date = uParseTime(date, '{y}-{m}-{d}')
1831 1988
     },
1832 1989
     watch: {
1833
-      isVisibility(val) {
1990
+      "dialysisPrescription.dialysis_duration_hour":function(){
1991
+        let  dialysis_duration_minute = 0
1992
+        let dialysis_duration_hour = 0
1993
+        let duration = 0
1994
+
1995
+        if (this.dialysisPrescription.dialysis_duration_minute == ''){
1996
+          dialysis_duration_minute = 0
1997
+        }else{
1998
+          dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
1999
+        }
2000
+
2001
+        if (this.dialysisPrescription.dialysis_duration_hour == ''){
2002
+          dialysis_duration_hour = 0
2003
+
2004
+        }else{
2005
+
2006
+          dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
2007
+
2008
+        }
2009
+        duration = parseFloat(dialysis_duration_hour) * 60 + parseFloat(dialysis_duration_minute)
2010
+
2011
+
2012
+
2013
+
2014
+        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2015
+          this.dialysisPrescription.anticoagulant_shouji,
2016
+          duration,
2017
+          this.dialysisPrescription.anticoagulant_weichi
2018
+        );
2019
+        if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2020
+          this.dialysisPrescription.anticoagulant_zongliang = ''
2021
+        }
2022
+      },
2023
+      "dialysisPrescription.dialysis_duration_minute":function(){
2024
+        let  dialysis_duration_minute = 0
2025
+        let dialysis_duration_hour = 0
2026
+        let duration = 0
2027
+
2028
+        if (this.dialysisPrescription.dialysis_duration_minute == ''){
2029
+          dialysis_duration_minute = 0
2030
+        }else{
2031
+          dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
2032
+        }
2033
+
2034
+        if (this.dialysisPrescription.dialysis_duration_hour == ''){
2035
+          dialysis_duration_hour = 0
2036
+
2037
+        }else{
2038
+
2039
+          dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
2040
+
2041
+        }
2042
+        duration = parseFloat(dialysis_duration_hour) * 60 + parseFloat(dialysis_duration_minute)
2043
+
2044
+
1834 2045
 
2046
+        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2047
+          this.dialysisPrescription.anticoagulant_shouji,
2048
+          duration,
2049
+          this.dialysisPrescription.anticoagulant_weichi
2050
+        );
2051
+        if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2052
+          this.dialysisPrescription.anticoagulant_zongliang = ''
2053
+        }
1835 2054
       },
1836
-      'prescription.id': function() {
2055
+      "dialysisPrescription.anticoagulant_shouji":function(){
2056
+
2057
+        let  dialysis_duration_minute = 0
2058
+        let dialysis_duration_hour = 0
2059
+        let duration = 0
2060
+
2061
+        if (this.dialysisPrescription.dialysis_duration_minute == ''){
2062
+          dialysis_duration_minute = 0
2063
+        }else{
2064
+          dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
2065
+        }
2066
+
2067
+        if (this.dialysisPrescription.dialysis_duration_hour == ''){
2068
+          dialysis_duration_hour = 0
2069
+
2070
+        }else{
2071
+
2072
+          dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
2073
+
2074
+        }
2075
+        duration = parseFloat(dialysis_duration_hour) * 60 + parseFloat(dialysis_duration_minute)
2076
+
2077
+
2078
+        console.log(duration)
2079
+
2080
+        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2081
+          this.dialysisPrescription.anticoagulant_shouji,
2082
+          duration,
2083
+          this.dialysisPrescription.anticoagulant_weichi
2084
+        );
2085
+        if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2086
+          this.dialysisPrescription.anticoagulant_zongliang = ''
2087
+        }
2088
+      },
2089
+      "dialysisPrescription.anticoagulant_weichi":function(){
2090
+        let  dialysis_duration_minute = 0
2091
+        let dialysis_duration_hour = 0
2092
+        let duration = 0
2093
+
2094
+        if (this.dialysisPrescription.dialysis_duration_minute == ''){
2095
+          dialysis_duration_minute = 0
2096
+        }else{
2097
+          dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
2098
+        }
2099
+
2100
+        if (this.dialysisPrescription.dialysis_duration_hour == ''){
2101
+          dialysis_duration_hour = 0
2102
+
2103
+        }else{
2104
+
2105
+          dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
2106
+
2107
+        }
2108
+        duration = parseFloat(dialysis_duration_hour) * 60 + parseFloat(dialysis_duration_minute)
2109
+
2110
+        console.log(duration)
2111
+
2112
+        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2113
+          this.dialysisPrescription.anticoagulant_shouji,
2114
+          duration,
2115
+          this.dialysisPrescription.anticoagulant_weichi
2116
+        );
2117
+        if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2118
+          this.dialysisPrescription.anticoagulant_zongliang = ''
2119
+        }
2120
+      }, 'prescription.id': function() {
1837 2121
         if (this.prescription.id > 0) {
1838 2122
           for (var index in this.dialysisPrescription) {
1839 2123
             this.dialysisPrescription[index] = this.prescription[index]
@@ -2073,9 +2357,18 @@
2073 2357
 
2074 2358
 </script>
2075 2359
 
2076
-<style scoped>
2360
+<style rel="stylesheet/scss" lang="scss" scoped>
2077 2361
   .el-checkbox, .el-checkbox__input {
2078 2362
     vertical-align: middle;
2079 2363
   }
2080 2364
 
2365
+
2366
+  .newLine {
2367
+    display: flex;
2368
+    justify-content: space-between;
2369
+    height: 40px;
2370
+    line-height: 40px;
2371
+    border-bottom: 1px solid #ccc;
2372
+  }
2373
+
2081 2374
 </style>

+ 282 - 98
src/xt_pages/dialysis/details/dialog/doubleCheckDialog.vue Wyświetl plik

@@ -43,6 +43,16 @@
43 43
       </el-form-item>
44 44
     </el-form>
45 45
 
46
+    <el-form :inline="true" class="demo-form-inline" :model="doubleReview" label-width="110px">
47
+    <el-form-item label="核对时间 : ">
48
+        <el-time-picker
49
+          v-model="time"
50
+          format='HH:mm'
51
+          value-format="HH:mm"
52
+          placeholder="请输入核对时间">
53
+        </el-time-picker>
54
+      </el-form-item>
55
+    </el-form>
46 56
 
47 57
 
48 58
     <el-form :inline="true" class="demo-form-inline" :model="doubleReview" label-width="110px">
@@ -51,7 +61,6 @@
51 61
     </el-form>
52 62
 
53 63
 
54
-
55 64
     <div slot="footer" class="dialog-footer">
56 65
       <el-button @click="handleCancle">取 消</el-button>
57 66
       <el-button type="primary" @click="handleComfirm">保 存</el-button>
@@ -62,134 +71,286 @@
62 71
 </template>
63 72
 
64 73
 <script>
65
-  import {postDoubleCheck} from "@/api/dialysis";
66
-  import {uParseTime} from "@/utils/tools";
74
+  import { postDoubleCheck } from '@/api/dialysis'
75
+  import { uParseTime } from '@/utils/tools'
67 76
 
68 77
   export default {
69
-    name: "doubleCheckDialog",
78
+    name: 'doubleCheckDialog',
70 79
     data() {
71 80
       return {
72 81
         isVisibility: false,
73
-
82
+        time:'',
74 83
         isClose: false,
75 84
         doubleReview: {
76
-          dialysis_item_check: "1",
77
-          dialysis_parameter_check: "1",
78
-          vascular_access_verification: "1",
79
-          pipeline_connection_check: "1",
80
-          dialysis_item_desc: "",
81
-          dialysis_parameter_desc: "",
82
-          vascular_access_desc: "",
83
-          pipeline_connection_desc: "",
84
-          collator: "",
85
+          dialysis_item_check: '1',
86
+          dialysis_parameter_check: '1',
87
+          vascular_access_verification: '1',
88
+          pipeline_connection_check: '1',
89
+          dialysis_item_desc: '',
90
+          dialysis_parameter_desc: '',
91
+          vascular_access_desc: '',
92
+          pipeline_connection_desc: '',
93
+          collator: '',
85 94
 
86 95
           creater: 0,
87 96
           modifier: 0,
88 97
           created_time: 0,
89 98
           updated_time: 0,
99
+          check_time: 0,
100
+          first_check_time: 0
90 101
         },
91 102
 
92
-        record_date: ""
93
-      };
103
+        record_date: ''
104
+      }
94 105
     }, methods: {
95 106
       show() {
96
-        this.isVisibility = true;
107
+        this.isVisibility = true
108
+
109
+
110
+
111
+
97 112
       },
98 113
       hide() {
99
-        this.isVisibility = false;
114
+        this.isVisibility = false
100 115
       },
101
-      handleCancle: function () {
102
-        this.isVisibility = false;
116
+      handleCancle: function() {
117
+        this.isVisibility = false
103 118
 
104
-      }, handleComfirm: function () {
119
+      }, handleComfirm: function() {
105 120
 
106 121
         if (this.patient.id <= 0) {
107
-          this.$message.error("没有选择患者")
122
+          this.$message.error('没有选择患者')
108 123
           return
109 124
         }
110 125
 
111
-        let ParamsQuery = this.doubleReview;
112
-        ParamsQuery["patient"] = this.patient.id;
113
-        ParamsQuery["record_date"] = this.record_date;
126
+        let ParamsQuery = this.doubleReview
127
+        ParamsQuery['patient'] = this.patient.id
128
+        ParamsQuery['record_date'] = this.record_date
129
+        ParamsQuery['check_time'] = this.record_date +" "+ this.time
130
+
114 131
         postDoubleCheck(ParamsQuery).then(response => {
115 132
           if (response.data.state == 0) {
116
-            this.$message.error(response.data.msg);
117
-            return false;
133
+            this.$message.error(response.data.msg)
134
+            return false
118 135
           } else {
119 136
             this.$notify({
120
-              title: "成功",
121
-              message: "提交成功",
122
-              type: "success",
137
+              title: '成功',
138
+              message: '提交成功',
139
+              type: 'success',
123 140
               duration: 2000
124
-            });
125
-            this.doubleReview.created_time =   response.data.data.doubleCheck.created_time
126
-            this.doubleReview.creater =  response.data.data.doubleCheck.creater
127
-            this.doubleReview.updated_time =  response.data.data.doubleCheck.updated_time
128
-            this.doubleReview.modifier =   response.data.data.doubleCheck.modifier
141
+            })
142
+
143
+            this.doubleReview.creater = response.data.data.doubleCheck.creater;
144
+            this.doubleReview.check_time =
145
+              response.data.data.doubleCheck.check_time;
146
+            this.doubleReview.first_check_time =
147
+              response.data.data.doubleCheck.first_check_time;
148
+            this.doubleReview.modifier = response.data.data.doubleCheck.modifier;
129 149
 
130 150
 
131
-            let doublecheck_resp = response.data.data.doubleCheck;
132
-            var doubleCheck = this.double_check;
151
+            let doublecheck_resp = response.data.data.doubleCheck
152
+            var doubleCheck = this.double_check
133 153
             for (var index in doublecheck_resp) {
134 154
               // doubleCheck[index] = doublecheck_resp[index];
135 155
               this.$set(doubleCheck, index, doublecheck_resp[index])
136 156
             }
137 157
             this.hide()
138 158
           }
139
-        });
159
+        })
140 160
 
141
-      }, getFirstCheckDesc: function () {
142
-        let time = uParseTime(this.doubleReview.created_time, "{y}-{m}-{d}  {h}:{i}")
143
-        if (this.doubleReview.creater <= 0) {
144
-          return "";
145
-        }
161
+      },
162
+      getFirstCheckDesc: function() {
163
+        if (
164
+          this.doubleReview.first_check_time > 0 &&
165
+          this.doubleReview.check_time > 0
166
+        ) {
167
+          if (this.doubleReview.first_check_time < this.doubleReview.check_time) {
168
+            let time = uParseTime(
169
+              this.doubleReview.first_check_time,
170
+              "{y}-{m}-{d}  {h}:{i}"
171
+            );
172
+            if (this.doubleReview.creater <= 0) {
173
+              return "";
174
+            }
146 175
 
147
-        var desc = "";
148
-        if (this.admin_users == null || typeof this.admin_users == "undefined") {
149
-          return "";
150
-        }
176
+            var desc = "";
177
+            if (
178
+              this.admin_users == null ||
179
+              typeof this.admin_users.length == "undefined"
180
+            ) {
181
+              return "";
182
+            }
151 183
 
152
-        var leng = this.admin_users.length;
153
-        if (leng == 0) {
154
-          return "";
155
-        }
184
+            var leng = this.admin_users.length;
185
+            if (leng == 0) {
186
+              return "";
187
+            }
188
+
189
+            for (let index = 0; index < leng; index++) {
190
+              if (this.admin_users[index].id == this.doubleReview.creater) {
191
+                let name = this.admin_users[index].name;
192
+                desc = "首次核对人员:" + name + " 首次核对时间:" + time;
193
+
194
+                break;
195
+              }
196
+            }
197
+            return desc;
198
+          } else {
199
+            let time = uParseTime(
200
+              this.doubleReview.check_time,
201
+              "{y}-{m}-{d}  {h}:{i}"
202
+            );
203
+            if (this.doubleReview.modifier <= 0) {
204
+              return "";
205
+            }
206
+
207
+            var desc = "";
208
+            if (
209
+              this.admin_users == null ||
210
+              typeof this.admin_users.length == "undefined"
211
+            ) {
212
+              return "";
213
+            }
214
+
215
+            var leng = this.admin_users.length;
216
+            if (leng == 0) {
217
+              return "";
218
+            }
219
+
220
+            for (let index = 0; index < leng; index++) {
221
+              if (this.admin_users[index].id == this.doubleReview.modifier) {
222
+                let name = this.admin_users[index].name;
223
+                desc = "首次核对人员:" + name + " 首次核对时间:" + time;
156 224
 
157
-        for (let index = 0; index < leng; index++) {
158
-          if (this.admin_users[index].id == this.doubleReview.creater) {
159
-            let name = this.admin_users[index].name;
160
-            desc = "首次核对人员:"+name +"  首次核对时间:"+time
161
-            break;
225
+                break;
226
+              }
227
+            }
228
+            return desc;
229
+          }
230
+        } else {
231
+          let time = uParseTime(
232
+            this.doubleReview.first_check_time,
233
+            "{y}-{m}-{d}  {h}:{i}"
234
+          );
235
+          if (this.doubleReview.creater <= 0) {
236
+            return "";
162 237
           }
163
-        }
164
-        return desc;
165 238
 
166
-      }, getScondCheckDesc: function () {
239
+          var desc = "";
240
+          if (
241
+            this.admin_users == null ||
242
+            typeof this.admin_users.length == "undefined"
243
+          ) {
244
+            return "";
245
+          }
167 246
 
168
-        let time = uParseTime(this.doubleReview.updated_time, "{y}-{m}-{d} {h}:{i}")
169
-        if (this.doubleReview.modifier <= 0) {
170
-          return "";
171
-        }
172
-        var desc = "";
173
-        if (this.admin_users == null || typeof this.admin_users.length == "undefined") {
174
-          return desc;
175
-        }
176
-        var leng = this.admin_users.length;
177
-        if (leng == 0) {
247
+          var leng = this.admin_users.length;
248
+          if (leng == 0) {
249
+            return "";
250
+          }
251
+
252
+          for (let index = 0; index < leng; index++) {
253
+            if (this.admin_users[index].id == this.doubleReview.creater) {
254
+              let name = this.admin_users[index].name;
255
+              desc = "首次核对人员:" + name + " 首次核对时间:" + time;
256
+
257
+              break;
258
+            }
259
+          }
178 260
           return desc;
179 261
         }
180
-        for (let index = 0; index < leng; index++) {
181
-          if (this.admin_users[index].id == this.doubleReview.modifier) {
182
-            let name = this.admin_users[index].name;
183
-            desc = "第二次核对人员:"+name +"  第二次核对时间:"+time
184
-            break;
262
+      },
263
+      getScondCheckDesc: function() {
264
+        if (
265
+          this.doubleReview.first_check_time > 0 &&
266
+          this.doubleReview.check_time > 0
267
+        ) {
268
+          if (this.doubleReview.first_check_time < this.doubleReview.check_time) {
269
+            let time = uParseTime(
270
+              this.doubleReview.check_time,
271
+              "{y}-{m}-{d} {h}:{i}"
272
+            );
273
+            if (this.doubleReview.modifier <= 0) {
274
+              return "";
275
+            }
276
+            var desc = "";
277
+            if (
278
+              this.admin_users == null ||
279
+              typeof this.admin_users.length == "undefined"
280
+            ) {
281
+              return desc;
282
+            }
283
+            var leng = this.admin_users.length;
284
+            if (leng == 0) {
285
+              return desc;
286
+            }
287
+            for (let index = 0; index < leng; index++) {
288
+              if (this.admin_users[index].id == this.doubleReview.modifier) {
289
+                let name = this.admin_users[index].name;
290
+                desc = "第二次核对人员:" + name + " 第二次核对时间:" + time;
291
+                break;
292
+              }
293
+            }
294
+            return desc;
295
+          } else {
296
+            let time = uParseTime(
297
+              this.doubleReview.first_check_time,
298
+              "{y}-{m}-{d} {h}:{i}"
299
+            );
300
+            if (this.doubleReview.creater <= 0) {
301
+              return "";
302
+            }
303
+            var desc = "";
304
+            if (
305
+              this.admin_users == null ||
306
+              typeof this.admin_users.length == "undefined"
307
+            ) {
308
+              return desc;
309
+            }
310
+            var leng = this.admin_users.length;
311
+            if (leng == 0) {
312
+              return desc;
313
+            }
314
+            for (let index = 0; index < leng; index++) {
315
+              if (this.admin_users[index].id == this.doubleReview.creater) {
316
+                let name = this.admin_users[index].name;
317
+                desc = "第二次核对人员:" + name + " 第二次核对时间:" + time;
318
+                break;
319
+              }
320
+            }
321
+            return desc;
322
+          }
323
+        } else {
324
+          let time = uParseTime(
325
+            this.doubleReview.check_time,
326
+            "{y}-{m}-{d} {h}:{i}"
327
+          );
328
+          if (this.doubleReview.modifier <= 0) {
329
+            return "";
185 330
           }
331
+          var desc = "";
332
+          if (
333
+            this.admin_users == null ||
334
+            typeof this.admin_users.length == "undefined"
335
+          ) {
336
+            return desc;
337
+          }
338
+          var leng = this.admin_users.length;
339
+          if (leng == 0) {
340
+            return desc;
341
+          }
342
+          for (let index = 0; index < leng; index++) {
343
+            if (this.admin_users[index].id == this.doubleReview.modifier) {
344
+              let name = this.admin_users[index].name;
345
+              desc = "第二次核对人员:" + name + " 第二次核对时间:" + time;
346
+              break;
347
+            }
348
+          }
349
+          return desc;
186 350
         }
187
-        return desc;
188
-
189
-      }
190
-
191
-
351
+      },
192 352
     },
353
+
193 354
     props: {
194 355
       admin_users: { //系统用户列表
195 356
         type: Array,
@@ -201,49 +362,72 @@
201 362
       double_check: { // 双人核对
202 363
         type: Object,
203 364
         default: () => {
204
-          return {id: 0}
365
+          return { id: 0 }
205 366
         }
206 367
       },
207 368
       patient: { // 患者信息
208 369
         type: Object,
209 370
         default: () => {
210
-          return {id: 0}
371
+          return { id: 0 }
211 372
         }
212
-      },
373
+      }
213 374
 
214 375
     },
215 376
     watch: {
216 377
       isVisibility(val) {
217 378
 
218
-      }, "double_check.id": function () {
379
+      }, 'double_check.id': function() {
219 380
         if (this.double_check.id > 0) {
220 381
           for (var index in this.doubleReview) {
221
-            this.doubleReview[index] = this.double_check[index] + "";
382
+            this.doubleReview[index] = this.double_check[index] + ''
222 383
           }
223
-          this.doubleReview.created_time =   this.double_check['created_time']
224
-          this.doubleReview.creater =  this.double_check['creater']
225
-          this.doubleReview.updated_time =  this.double_check['updated_time']
226
-          this.doubleReview.modifier =   this.double_check['modifier']
384
+          this.doubleReview.created_time = this.double_check['created_time']
385
+          this.doubleReview.creater = this.double_check['creater']
386
+          this.doubleReview.updated_time = this.double_check['updated_time']
387
+          this.doubleReview.modifier = this.double_check['modifier']
227 388
 
228 389
 
229
-          console.log( this.doubleReview)
390
+          this.doubleReview.dialysis_item_desc = this.double_check['dialysis_item_desc'];
391
+          this.doubleReview.dialysis_parameter_desc = this.double_check['dialysis_parameter_desc'];
392
+          this.doubleReview.vascular_access_desc = this.double_check['vascular_access_desc'];
393
+          this.doubleReview.pipeline_connection_desc = this.double_check['pipeline_connection_desc'];
230 394
 
231 395
 
396
+          this.doubleReview.created_time =this.double_check['created_time']
397
+          this.doubleReview.creater =this.double_check['creater']
398
+          this.doubleReview.updated_time = this.double_check['updated_time']
399
+          this.doubleReview.modifier = this.double_check['modifier']
400
+          this.doubleReview.check_time = this.double_check['check_time']
401
+          this.doubleReview.first_check_time =  this.double_check['first_check_time']
232 402
 
233 403
         } else {
234
-          this.dialysis_item_check = "1"
235
-          this.dialysis_parameter_check = "1"
236
-          this.vascular_access_verification = "1"
237
-          this.pipeline_connection_check = "1"
238
-
404
+          this.dialysis_item_check = '1'
405
+          this.dialysis_parameter_check = '1'
406
+          this.vascular_access_verification = '1'
407
+          this.pipeline_connection_check = '1'
408
+
409
+          this.doubleReview.dialysis_item_desc = "";
410
+          this.doubleReview.dialysis_parameter_desc = "";
411
+          this.doubleReview.vascular_access_desc = "";
412
+          this.doubleReview.pipeline_connection_desc = "";
239 413
         }
240
-      },
414
+      }
241 415
 
242 416
     },
243 417
     created() {
244
-      var date = this.$route.query && this.$route.query.date;
245
-      this.record_date = uParseTime(date, '{y}-{m}-{d}');
246
-    },
418
+      var date = this.$route.query && this.$route.query.date
419
+      this.record_date = uParseTime(date, '{y}-{m}-{d}')
420
+
421
+      var nowDate = new Date()
422
+      var nowYear = nowDate.getFullYear()
423
+      var nowMonth = nowDate.getMonth() + 1
424
+      var nowDay = nowDate.getDate()
425
+      var nowHours = nowDate.getHours()
426
+      var nowMinutes = nowDate.getMinutes()
427
+      var time =  (nowHours < 10 ? '0' + nowHours : nowHours) + ':' + (nowMinutes < 10 ? '0' + nowMinutes : nowMinutes)
428
+      this.time = time
429
+
430
+    }
247 431
 
248 432
   }
249 433
 </script>

+ 174 - 97
src/xt_pages/dialysis/details/dialog/finish_dialog.vue Wyświetl plik

@@ -1,124 +1,201 @@
1 1
 <template>
2
-    <div>
3
-        <el-dialog title="透析下机" :visible.sync="visible" width="854px" :modal-append-to-body="false" >
4
-            <div class="txsj">
5
-            </div>
6
-            <el-form :model="form" label-width="80px">
7
-                <el-form-item label="下机护士">
8
-                    <el-select v-model="form.nurse_id" :disabled="!(dialysis_order.id != 0 && dialysis_order.stage == 1)">
9
-                        <el-option v-for="(admin, index) in admins" :key="index" :value="admin.id" :label="admin.name"></el-option>
10
-                    </el-select>
11
-                </el-form-item>
12
-
13
-              <el-form-item label="下机时间 :"  style="width:275px">
14
-                <el-date-picker
15
-                  type="datetime"
16
-                  format="yyyy-MM-dd HH"
17
-                  value-format="yyyy-MM-dd HH"
18
-                  placeholder="选择时间"
19
-                  v-model="start_time"
20
-                  style="width:100%;"
21
-                ></el-date-picker>
22
-              </el-form-item>
23
-
24
-                <el-form-item>
25
-                    <el-button v-if="(dialysis_order.id != 0 && dialysis_order.stage == 1)" @click="submit" :loading="loading" type="primary">执行下机</el-button>
26
-                    <el-button v-else-if="(dialysis_order.id != 0 && dialysis_order.stage == 2)" :disabled="true" type="info">已下机</el-button>
27
-                    <el-button v-else :disabled="true" type="info">未上机</el-button>
28
-                </el-form-item>
29
-
30
-            </el-form>
31
-        </el-dialog>
32
-    </div>
2
+  <div>
3
+    <el-dialog title="透析下机" :visible.sync="visible" width="854px" :modal-append-to-body="false">
4
+      <div class="txsj">
5
+      </div>
6
+      <el-form :model="form" label-width="80px">
7
+        <el-form-item label="下机护士">
8
+          <el-select v-model="form.nurse_id" :disabled="!(dialysis_order.id != 0)">
9
+            <el-option v-for="(admin, index) in admins" :key="index" :value="admin.id" :label="admin.name"></el-option>
10
+          </el-select>
11
+        </el-form-item>
12
+
13
+        <el-form-item label="下机时间 :" style="width:275px">
14
+          <el-date-picker
15
+            type="datetime"
16
+            format="yyyy-MM-dd HH:mm"
17
+            value-format="yyyy-MM-dd HH:mm"
18
+            placeholder="选择时间"
19
+            v-model="end_time"
20
+            style="width:100%;"
21
+          ></el-date-picker>
22
+        </el-form-item>
23
+
24
+        <el-form-item>
25
+          <el-button v-if="(dialysis_order.id != 0 && dialysis_order.stage == 1)" @click="submit" :loading="loading"
26
+                     type="primary">执行下机
27
+          </el-button>
28
+          <!--<el-button v-else-if="(dialysis_order.id != 0 && dialysis_order.stage == 2)" :disabled="true" type="info">-->
29
+            <!--已下机-->
30
+          <!--</el-button>-->
31
+          <!--<el-button v-else :disabled="true" type="info">未上机</el-button>-->
32
+          <el-button
33
+            v-if="dialysis_order.stage == 2 && (isPremission || this.$store.getters.xt_user.user.id == this.creator)"
34
+            type="primary" @click="modifyFinish">修改下机
35
+          </el-button>
36
+
37
+
38
+        </el-form-item>
39
+
40
+      </el-form>
41
+    </el-dialog>
42
+  </div>
33 43
 </template>
34 44
 
35 45
 <script>
36
-import { finishDialysis } from "@/api/dialysis_record"
37
-import { parseTime } from "@/utils"
46
+  import { finishDialysis,PostModifyFinishDialysis } from '@/api/dialysis_record'
47
+  import { parseTime } from '@/utils'
38 48
 
39
-export default {
40
-    name: "FinishDialog",
49
+  export default {
50
+    name: 'FinishDialog',
41 51
     data() {
42
-        return {
43
-            visible: false,
44
-            loading: false,
52
+      return {
53
+        visible: false,
54
+        loading: false,
55
+        creator: 0,
56
+        patient_id: 0,
57
+        schedule_date: 0,
58
+        isPremission:false,
59
+        end_time: '',
45 60
 
46
-            patient_id: 0,
47
-            schedule_date: 0,
48
-            start_time: '',
49
-
50
-            form: {
51
-                nurse_id: 0,
52
-            }
61
+        form: {
62
+          nurse_id: 0
53 63
         }
64
+      }
54 65
     },
55 66
     props: {
56
-        dialysis_order: {
57
-            type: Object,
58
-        },
59
-        schedule: {
60
-            type: Object,
61
-        },
62
-        admins: {
63
-            type: Array,
64
-        },
67
+      dialysis_order: {
68
+        type: Object
69
+      },
70
+      schedule: {
71
+        type: Object
72
+      },
73
+      admins: {
74
+        type: Array
75
+      }, special_premission: {
76
+        type: Array,
77
+      },
65 78
     },
66 79
     created() {
80
+
81
+    },
82
+    watch: {
83
+      'dialysis_order.id': function() {
84
+        if (this.dialysis_order.id == 0) {
85
+          this.form.nurse_id = 0
86
+        } else if (this.dialysis_order.stage == 1) {
87
+          this.form.nurse_id = this.$store.getters.xt_user.user.id
88
+        } else {
89
+          this.form.nurse_id = this.dialysis_order.finish_nurse
90
+        }
91
+      }
92
+    },
93
+    methods: {
94
+      show: function() {
95
+        this.visible = true
96
+        var nowDate = new Date()
97
+        var nowYear = nowDate.getFullYear()
98
+        var nowMonth = nowDate.getMonth() + 1
99
+        var nowDay = nowDate.getDate()
100
+        var nowHours = nowDate.getHours()
101
+        var nowMinutes = nowDate.getMinutes()
102
+        var time =
103
+          nowYear +
104
+          '-' +
105
+          (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
106
+          '-' +
107
+          (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (nowHours < 10 ? '0' + nowHours : nowHours) + ':' + (nowMinutes < 10 ? '0' + nowMinutes : nowMinutes)
67 108
         this.patient_id = this.$route.query.patient_id
68 109
         this.schedule_date = this.$route.query.date
110
+        console.log(this.dialysis_order.end_time)
111
+
112
+        this.end_time = this.dialysis_order.finish_creator == 0 ? time : this.getTime(this.dialysis_order.end_time, '{y}-{m}-{d} {h}:{i}')
69 113
 
70 114
         if (this.dialysis_order.id == 0) {
71
-            this.form.nurse_id = 0
115
+          this.form.nurse_id = 0
72 116
         } else if (this.dialysis_order.stage == 1) {
73
-            this.form.nurse_id = this.$store.getters.xt_user.user.id
117
+          this.form.nurse_id = this.$store.getters.xt_user.user.id
74 118
         } else {
75
-            this.form.nurse_id = this.dialysis_order.finish_nurse
119
+          this.form.nurse_id = this.dialysis_order.finish_nurse
76 120
         }
77
-    },
78
-    watch: {
79
-        "dialysis_order.id": function() {
80
-            if (this.dialysis_order.id == 0) {
81
-                this.form.nurse_id = 0
82
-            } else if (this.dialysis_order.stage == 1) {
83
-                this.form.nurse_id = this.$store.getters.xt_user.user.id
84
-            } else {
85
-                this.form.nurse_id = this.dialysis_order.finish_nurse
121
+
122
+
123
+        if (this.dialysis_order.finish_creator > 0) {
124
+          for (let i = 0; i < this.special_premission.length; i++) {
125
+            if (this.$store.getters.xt_user.user.id == this.special_premission[i].admin_user_id) {
126
+              this.isPremission = true
86 127
             }
87
-        },
88
-    },
89
-    methods: {
90
-        show: function() {
91
-            this.visible = true
92
-        },
93
-        hide: function() {
94
-            this.visible = false
95
-        },
96
-        submit: function() {
97
-            this.loading = true
98
-            finishDialysis(this.patient_id, parseTime(this.schedule_date, "{y}-{m}-{d}"), this.form.nurse_id).then(rs => {
99
-                this.loading = false
100
-                var resp = rs.data
101
-                if (resp.state == 1) {
102
-                    var dialysis_order = resp.data.dialysis_order
103
-                    var this_order = this.dialysis_order
104
-                    for (const key in dialysis_order) {
105
-                        // this.dialysis_order[key] = dialysis_order[key]
106
-                        this.$set(this_order, key, dialysis_order[key])
107
-                    }
108
-
109
-                } else {
110
-                    this.$message.error(resp.msg)
111
-                }
112
-            })
113
-        },
114
-    },
115
-}
128
+          }
129
+        }
130
+
131
+        if (this.dialysis_order.finish_creator > 0) {
132
+            this.creator = this.dialysis_order.finish_creator
133
+        }
134
+
135
+
136
+        console.log(this.creator)
137
+        console.log(this.isPremission)
138
+
139
+
140
+
141
+      },
142
+      hide: function() {
143
+        this.visible = false
144
+      },modifyFinish:function(){
145
+        let ParamsQuery = {};
146
+        ParamsQuery["id"] = this.dialysis_order.id;
147
+        ParamsQuery["nurse"] = this.form.nurse_id;
148
+        ParamsQuery["end_time"] = this.end_time;
149
+        PostModifyFinishDialysis(ParamsQuery).then(response => {
150
+          if (response.data.state == 0) {
151
+            this.$message.error(response.data.msg)
152
+
153
+            return false;
154
+          } else {
155
+            this.$message.success("修改成功")
156
+            var record = this.dialysis_order;
157
+            for (const key in response.data.data.dialysis_order) {
158
+              this.$set(record, key, response.data.data.dialysis_order[key]);
159
+            }
160
+            console.log(response.data.data.after)
161
+            this.$emit('assessmentAfterDislysis', response.data.data.after)
162
+          }
163
+        });
164
+
165
+
166
+      },
167
+      submit: function() {
168
+        this.loading = true
169
+        finishDialysis(this.patient_id, parseTime(this.schedule_date, '{y}-{m}-{d}'), this.end_time, this.form.nurse_id).then(rs => {
170
+          this.loading = false
171
+          var resp = rs.data
172
+          if (resp.state == 1) {
173
+            var dialysis_order = resp.data.dialysis_order
174
+            var this_order = this.dialysis_order
175
+            for (const key in dialysis_order) {
176
+              this.$set(this_order, key, dialysis_order[key])
177
+            }
178
+            this.hide()
179
+            this.$emit('assessmentAfterDislysis', resp.data.assessmentAfterDislysis)
180
+
181
+          } else {
182
+            this.$message.error(resp.msg)
183
+          }
184
+        })
185
+      }, getTime(value, temp) {
186
+        if (value != undefined) {
187
+          return parseTime(value, temp)
188
+        }
189
+        return ''
190
+      }
191
+    }
192
+  }
116 193
 </script>
117 194
 
118 195
 
119 196
 <style scoped>
120
-.txsj{
197
+  .txsj {
121 198
     text-align: center;
122 199
     margin-bottom: 20px;
123
-}
200
+  }
124 201
 </style>

+ 47 - 4
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Wyświetl plik

@@ -317,7 +317,7 @@
317 317
 <script>
318 318
   import { parseTime } from '@/utils'
319 319
   import { getDataConfig } from '@/utils/data'
320
-  import { editMonitor, postDelMonitorInfo } from '@/api/dialysis_record'
320
+  import { editMonitor, postDelMonitorInfo,getTodayMonitor } from '@/api/dialysis_record'
321 321
   import store from '@/store'
322 322
 
323 323
 export default {
@@ -331,7 +331,7 @@ export default {
331 331
         patient_id: 0,
332 332
         schedule_date: 0,
333 333
         template_id: 0,
334
-
334
+        isAdd:false,
335 335
         // monitoring_date: 0,
336 336
 
337 337
         form: {
@@ -421,7 +421,45 @@ export default {
421 421
         this.setEditMonitor(null)
422 422
         this.$refs.table.setCurrentRow(null)
423 423
         this.edit = true
424
+        this.isAdd = true
425
+        this.getLastRecordTody()
426
+
427
+      },
428
+      getLastRecordTody () {
429
+        let params = {
430
+          patient_id: this.patient_id
431
+        }
432
+
433
+        getTodayMonitor(params).then(rs => {
434
+          var resp = rs.data.data
435
+          this.form.operate_time = resp.monitor.operate_time  ? (resp.monitor.operate_time + 3600) * 1000 : Date.parse(new Date())
436
+          this.form.pulse_frequency = '' // this.last_monitor_record.pulse_frequency;
437
+          this.form.breathing_rated = resp.monitor.breathing_rate ? resp.monitor.breathing_rate : ''
438
+          this.form.systolic_bp = '' // this.last_monitor_record.systolic_blood_pressure;
439
+          this.form.diastolic_bp = '' // this.last_monitor_record.diastolic_blood_pressure;
440
+          this.form.blood_flow_volume = resp.monitor.blood_flow_volume ? resp.monitor.blood_flow_volume : ''
441
+          this.form.venous_pressure = '' // this.last_monitor_record.venous_pressure;
442
+          this.form.arterial_pressure = '' // this.last_monitor_record.arterial_pressure;
443
+          this.form.transmembrane_pressure = '' // this.last_monitor_record.transmembrane_pressure;
444
+          this.form.ultrafiltration_rate = resp.monitor.ultrafiltration_rate ? resp.monitor.ultrafiltration_rate : ''
445
+          this.form.ultrafiltration_volume = resp.monitor.ultrafiltration_volume ? resp.monitor.ultrafiltration_volume : ''
446
+          this.form.sodium_concentration = resp.monitor.sodium_concentration ? resp.monitor.sodium_concentration : ''
447
+          this.form.dialysate_temperature = resp.monitor.dialysate_temperature  ? resp.monitor.dialysate_temperature : ''
448
+          this.form.temperature = resp.monitor.temperature ? resp.monitor.temperature : ''
449
+          this.form.replacement_rate = resp.monitor.replacement_rate ? resp.monitor.replacement_rate : ''
450
+          this.form.displacement_quantity = '' // this.last_monitor_record.displacement_quantity;
451
+          this.form.conductivity = ''
452
+          this.form.displacement_flow_quantity = ''
453
+
454
+          this.form.ktv = '' // this.last_monitor_record.ktv;
455
+          this.form.symptom = '' // this.last_monitor_record.symptom;
456
+          this.form.dispose = '' // this.last_monitor_record.dispose;
457
+          this.form.result = '' // this.last_monitor_record.result;
458
+
459
+
460
+        })
424 461
       },
462
+
425 463
       modifyRecordAction: function() {
426 464
         if (this.table_current_row == null) {
427 465
           this.$message.error('请选择一条监测记录')
@@ -430,6 +468,7 @@ export default {
430 468
         this.setEditMonitor(this.table_current_row)
431 469
         this.$refs.table.setCurrentRow(null)
432 470
         this.edit = true
471
+        this.isAdd = false
433 472
       },
434 473
       cancelEditAction: function() {
435 474
         this.setEditMonitor(null)
@@ -507,7 +546,7 @@ export default {
507 546
 
508 547
       submitAction: function() {
509 548
         // TODO loading
510
-        var is_new = this.form.id == 0
549
+        var is_new = this.form.id
511 550
         this.form.operate_time = parseInt(this.form.operate_time / 1000)
512 551
         this.form.systolic_bp = parseFloat(this.form.systolic_bp) == NaN ? 0 : parseFloat(this.form.systolic_bp)
513 552
         this.form.diastolic_bp = parseFloat(this.form.diastolic_bp) == NaN ? 0 : parseFloat(this.form.diastolic_bp)
@@ -534,7 +573,8 @@ export default {
534 573
           var resp = rs.data
535 574
           if (resp.state == 1) {
536 575
             var monitor = resp.data.monitor
537
-            if (is_new) {
576
+
577
+            if (this.isAdd) {
538 578
               this.monitors.unshift(monitor)
539 579
             } else {
540 580
               for (let index = 0; index < this.monitors.length; index++) {
@@ -589,6 +629,9 @@ export default {
589 629
           this.result_selecteds = []
590 630
         }
591 631
       },
632
+      setRecords (records) {
633
+        this.monitors = records
634
+      },
592 635
       resultSelectorChange: function() {
593 636
         if (this.result_selecteds.length > 0) {
594 637
           this.form.result = this.result_selecteds.join(',') + ','

+ 1 - 1
src/xt_pages/dialysis/details/dialysisComputer.vue Wyświetl plik

@@ -1,4 +1,4 @@
1
-<template>
1
+ <template>
2 2
   <div class="plate-box">
3 3
     <h2 class="DetailsTit"><span>{{ title }}</span></h2>
4 4
     <div class="plate " >

+ 48 - 5
src/xt_pages/dialysis/details/index.vue Wyświetl plik

@@ -8,6 +8,7 @@
8 8
     </div>
9 9
     <div class="details-bg" v-loading.fullscreen.lock="loading">
10 10
       <nav-igation
11
+        ref="nav"
11 12
         title="弹窗导航"
12 13
         @advice="adviceFunc"
13 14
         :patient="patient"
@@ -45,6 +46,16 @@
45 46
         :longAdvices="longAdvices"
46 47
         :waitUploadAdvices="waitUploadAdvices"
47 48
         :is_open="is_open"
49
+        :last_predialysis_evaluation = "lastPredialysisEvaluation"
50
+        :last_monitor_record = "lastMonitorRecord"
51
+        :last_assessment_after_dislysis = "lastAssessmentAfterDislysis"
52
+        :last_dialysis_prescribe = "lastDialysisPrescribe"
53
+        :last_dryWeight_dislysis = "lastDryWeightDislysis"
54
+        :special_premission = "headNurses"
55
+        @assessmentAfterDislysis="assessmentAfterDislysisFunc"
56
+
57
+
58
+
48 59
       >
49 60
       </nav-igation>
50 61
 
@@ -322,7 +333,15 @@
322 333
         tubingHemodialysis_info: [],
323 334
         safe_package_info: [],
324 335
         aliquid_info: [],
325
-        config: {}
336
+        config: {},
337
+
338
+        lastPredialysisEvaluation:{id: 0},
339
+        lastMonitorRecord:{id: 0},
340
+        lastAssessmentAfterDislysis:{id: 0},
341
+        lastDryWeightDislysis:{id: 0},
342
+        headNurses:[],
343
+        lastDialysisPrescribe:{id:0}
344
+
326 345
       }
327 346
     },
328 347
     created() {
@@ -358,7 +377,7 @@
358 377
 
359 378
         steps[4].finish = this.double_check.id > 0 && this.double_check.creater > 0 && this.double_check.modifier > 0
360 379
         steps[6].finish = this.monitor_records.length > 0
361
-        steps[8].finish = this.assessment_after_dislysis.id > 0
380
+        steps[8].finish = this.assessment_after_dislysis.id > 0 && this.assessment_after_dislysis.creater > 0
362 381
         steps[9].finish = this.treatment_summary.id > 0
363 382
 
364 383
         return steps
@@ -428,6 +447,10 @@
428 447
           this.loading = false
429 448
         })
430 449
 
450
+      },assessmentAfterDislysisFunc:function(val){
451
+        for (var index in val) {
452
+          this.$set(this.assessment_after_dislysis, index, val[index])
453
+        }
431 454
       },
432 455
       didDelMonitor(record_id) {
433 456
         var mrl = this.monitor_records.length
@@ -446,14 +469,11 @@
446 469
           var resp = rs.data
447 470
           if (resp.state == 1) {
448 471
             var patient = resp.data.patient // 患者信息
449
-            console.log('patient是史森明', patient)
450 472
             var schedual = resp.data.schedual // 患者排班信息
451 473
             var prescription = resp.data.prescription // 透析处方
452
-            console.log('prescription', prescription)
453 474
             var solution = resp.data.solution // 透析方案
454 475
             var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
455 476
             var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
456
-            console.log('predialysis_evaluation', predialysis_evaluation)
457 477
             var doctor_advices = resp.data.doctor_advices // 临时医嘱
458 478
             var double_check = resp.data.double_check // 双人核对
459 479
             var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
@@ -475,7 +495,30 @@
475 495
             var safe_package_info = resp.data.safe_package_info
476 496
             var aliquid_info = resp.data.aliquid_info
477 497
 
498
+
499
+            var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation
500
+            var lastMonitorRecord = resp.data.lastMonitorRecord
501
+            var lastAssessmentAfterDislysis = resp.data.lastAssessmentAfterDislysis
502
+            var lastDialysisPrescribe = resp.data.lastDialysisPrescribe
503
+            var lastDryWeightDislysis = resp.data.lastDryWeightDislysis
504
+
505
+
506
+            this.$refs.nav.setLastRecord(lastPredialysisEvaluation,lastMonitorRecord,lastAssessmentAfterDislysis,lastDialysisPrescribe,lastDryWeightDislysis)
507
+
508
+
509
+
510
+
511
+            var headNurses = resp.data.headNurse
512
+
513
+
478 514
             var config = resp.data.config
515
+            this.lastPredialysisEvaluation = lastPredialysisEvaluation
516
+            this.lastMonitorRecord = lastMonitorRecord
517
+            this.lastAssessmentAfterDislysis = lastAssessmentAfterDislysis
518
+            this.lastDialysisPrescribe = lastDialysisPrescribe
519
+            this.lastDryWeightDislysis = lastDryWeightDislysis
520
+            this.headNurses = headNurses
521
+
479 522
 
480 523
             this.niprocart_info = niprocart_info
481 524
             this.jms_info = jms_info

+ 4 - 1
src/xt_pages/dialysis/dialysisPage.vue Wyświetl plik

@@ -3446,7 +3446,10 @@ import { getDataConfig } from '@/utils/data'
3446 3446
       },
3447 3447
       // 医嘱相关
3448 3448
       getAdviceConfig() {
3449
-        getAdviceConfig().then(response => {
3449
+        let params = { //医嘱类型 0临时医嘱模版   1长期医嘱模版
3450
+          type: 0
3451
+        }
3452
+        getAdviceConfig(params.type).then(response => {
3450 3453
           if (response.data.state == 1) {
3451 3454
             this.deliveryWayOptions = response.data.data.drugways
3452 3455
             this.executionFrequencyOptions = response.data.data.efs

+ 150 - 138
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Wyświetl plik

@@ -21,27 +21,27 @@
21 21
         </div>
22 22
         <div class="inline_block">
23 23
           门诊:
24
-            <div class="under_line" style="width: 30px;text-align: center;">
25
-                <check-box  :checked="patientInfo_source_1 "></check-box>
26
-            </div>
24
+          <div class="under_line" style="width: 30px;text-align: center;">
25
+            <check-box  :checked="patientInfo_source_1 "></check-box>
26
+          </div>
27 27
         </div>
28 28
         <div class="inline_block">
29 29
           病区:
30
-            <div class="under_line" style="width: 50px;text-align: center;">
31
-                {{'/'}}
32
-            </div>
30
+          <div class="under_line" style="width: 50px;text-align: center;">
31
+            {{'/'}}
32
+          </div>
33 33
         </div>
34 34
         <div class="inline_block">
35 35
           床号:
36
-            <div class="under_line" style="width: 50px;text-align: center;">
37
-                {{'/'}}
38
-            </div>
36
+          <div class="under_line" style="width: 50px;text-align: center;">
37
+            {{'/'}}
38
+          </div>
39 39
         </div>
40 40
         <div class="inline_block">
41 41
           透析号:
42
-            <div class="under_line" style="width: 70px;text-align: center;">
43
-              {{patientInfo.dialysis_no}}
44
-            </div>
42
+          <div class="under_line" style="width: 70px;text-align: center;">
43
+            {{patientInfo.dialysis_no}}
44
+          </div>
45 45
         </div>
46 46
         <div class="inline_block" style="margin-left: 5px;">
47 47
           住院号/门诊号:
@@ -145,95 +145,95 @@
145 145
                     </div>
146 146
                   </div>
147 147
 
148
-                  <div class="inline_block" style="margin-left:10px;flex:1;">
149
-                    导管:
150
-                    <div class="under_line" style="width: 150px;text-align: center">
151
-                      {{predialysis.catheter?predialysis.catheter:'/'}}
152
-                    </div>
148
+                <div class="inline_block" style="margin-left:10px;flex:1;">
149
+                  导管:
150
+                  <div class="under_line" style="width: 150px;text-align: center">
151
+                    {{predialysis.catheter?predialysis.catheter:'/'}}
153 152
                   </div>
154
-                  <div class="inline_block" style="margin-left:10px;flex:1;">
155
-                    穿刺方式:
156
-                    <div class="under_line" style="width: 100px;text-align: center" v-if="predialysis.puncture_way == 0">
157
-                      /
158
-                    </div>
159
-                    <div class="under_line" style="width: 100px;text-align: center" v-if="predialysis.puncture_way == 1">
160
-                      绳梯
161
-                    </div>
162
-                    <div class="under_line" style="width: 100px;text-align: center" v-if="predialysis.puncture_way == 2">
163
-                      扣眼
164
-                    </div>
165
-                    <div class="under_line" style="width: 100px;text-align: center" v-if="predialysis.puncture_way == 3">
166
-                      区域
167
-                    </div>
153
+                </div>
154
+                <div class="inline_block" style="margin-left:10px;flex:1;">
155
+                  穿刺方式:
156
+                  <div class="under_line" style="width: 100px;text-align: center" v-if="predialysis.puncture_way == 0">
157
+                    /
168 158
                   </div>
169
-                  <div class="inline_block" style="margin-left:10px;flex:1;">
170
-                    穿刺针:
171
-                    <div class="under_line" style="width: 100px;text-align: center">
172
-                      {{predialysis.puncture_needle?predialysis.puncture_needle:'/'}}
173
-                    </div>
159
+                  <div class="under_line" style="width: 100px;text-align: center" v-if="predialysis.puncture_way == 1">
160
+                    绳梯
161
+                  </div>
162
+                  <div class="under_line" style="width: 100px;text-align: center" v-if="predialysis.puncture_way == 2">
163
+                    扣眼
164
+                  </div>
165
+                  <div class="under_line" style="width: 100px;text-align: center" v-if="predialysis.puncture_way == 3">
166
+                    区域
174 167
                   </div>
175 168
                 </div>
176
-                <div class="row" style="padding: 2px 0;line-height:23px;display:flex;">
177
-                  <div class="inline_block" style="flex:1;">
178
-                    透析方式:
179
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="!prescription.mode_id">
180
-                      /
181
-                    </div>
182
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==1">
183
-                      HD
184
-                    </div>
185
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==2">
186
-                      HDF
187
-                    </div>
188
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==3">
189
-                      HD+HP
190
-                    </div>
191
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==4">
192
-                      HP
193
-                    </div>
194
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==5">
195
-                      HF
196
-                    </div>
197
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==6">
198
-                      SCUF
199
-                    </div>
200
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==7">
201
-                      IUF
202
-                    </div>
203
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==8">
204
-                      HFHD
205
-                    </div>
206
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==9">
207
-                      HFHD+HP
208
-                    </div>
209
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==10">
210
-                      PHF
211
-                    </div>
212
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==11">
213
-                      HFR
214
-                    </div>
215
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==12">
216
-                      HDF+HP
217
-                    </div>
218
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==13">
219
-                      CRRT
220
-                    </div>
221
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==14">
222
-                      腹水回输
223
-                    </div>
224
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==15">
225
-                      HD前置换
226
-                    </div>
227
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==16">
228
-                      HD后置换
229
-                    </div>
230
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==17">
231
-                      HDF前置换
232
-                    </div>
233
-                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==18">
234
-                      HDF后置换
235
-                    </div>
169
+                <div class="inline_block" style="margin-left:10px;flex:1;">
170
+                  穿刺针:
171
+                  <div class="under_line" style="width: 100px;text-align: center">
172
+                    {{predialysis.puncture_needle?predialysis.puncture_needle:'/'}}
236 173
                   </div>
174
+                </div>
175
+              </div>
176
+              <div class="row" style="padding: 2px 0;line-height:23px;display:flex;">
177
+                <div class="inline_block" style="flex:1;">
178
+                  透析方式:
179
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="!prescription.mode_id">
180
+                    /
181
+                  </div>
182
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==1">
183
+                    HD
184
+                  </div>
185
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==2">
186
+                    HDF
187
+                  </div>
188
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==3">
189
+                    HD+HP
190
+                  </div>
191
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==4">
192
+                    HP
193
+                  </div>
194
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==5">
195
+                    HF
196
+                  </div>
197
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==6">
198
+                    SCUF
199
+                  </div>
200
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==7">
201
+                    IUF
202
+                  </div>
203
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==8">
204
+                    HFHD
205
+                  </div>
206
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==9">
207
+                    HFHD+HP
208
+                  </div>
209
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==10">
210
+                    PHF
211
+                  </div>
212
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==11">
213
+                    HFR
214
+                  </div>
215
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==12">
216
+                    HDF+HP
217
+                  </div>
218
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==13">
219
+                    CRRT
220
+                  </div>
221
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==14">
222
+                    腹水回输
223
+                  </div>
224
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==15">
225
+                    HD前置换
226
+                  </div>
227
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==16">
228
+                    HD后置换
229
+                  </div>
230
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==17">
231
+                    HDF前置换
232
+                  </div>
233
+                  <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==18">
234
+                    HDF后置换
235
+                  </div>
236
+                </div>
237 237
 
238 238
                   <div class="inline_block" style="margin-left:10px;flex:1;">
239 239
                     置换方式:
@@ -339,58 +339,70 @@
339 339
                   </div>
340 340
                   <div class="inline_block" style="margin-left:10px;">
341 341
                   流量:
342
-                    <div class="under_line" style="width: 50px;text-align: center;">
343
-                      {{prescription.dialysate_flow?prescription.dialysate_flow:'/'}}
344
-                    </div>
345
-                    ml/min
342
+                  <div class="under_line" style="width: 50px;text-align: center;">
343
+                    {{prescription.dialysate_flow?prescription.dialysate_flow:'/'}}
346 344
                   </div>
345
+                  ml/min
347 346
                 </div>
348
-                <div class="row" style="padding: 2px 0;line-height:23px;">
349
-                  <div class="inline_block" >
350
-                    抗凝剂:
351
-                    <div class="under_line" style="width: 150px;text-align: center">
352
-                      {{prescription.anticoagulant_name?prescription.anticoagulant_name:'/'}}
353
-                    </div>
347
+              </div>
348
+              <div class="row" style="padding: 2px 0;line-height:23px;">
349
+                <div class="inline_block" >
350
+                  抗凝剂:
351
+                  <div class="under_line" style="width: 150px;text-align: center">
352
+                    {{prescription.anticoagulant_name?prescription.anticoagulant_name:'/'}}
354 353
                   </div>
355
-                  <div class="inline_block" style="margin-left:20px;" v-if="prescription.anticoagulant != 5">
356
-                    首剂:
357
-                    <div class="under_line" style="width: 50px;text-align: center;">
358
-                      {{prescription.anticoagulant_shouji?prescription.anticoagulant_shouji:'/'}}
359
-                    </div>
360
-                    lu
354
+                </div>
355
+                <div class="inline_block" style="margin-left:20px;" v-if="prescription.anticoagulant != 5">
356
+                  首剂:
357
+                  <div class="under_line" style="width: 50px;text-align: center;">
358
+                    {{prescription.anticoagulant_shouji?prescription.anticoagulant_shouji:'/'}}
361 359
                   </div>
362
-                  <div class="inline_block" style="margin-left:20px;">
360
+                  <span v-if="prescription.anticoagulant == 4">mg</span>
361
+                  <span v-if="prescription.anticoagulant == 3">iu</span>
362
+                  <span v-if="prescription.anticoagulant == 2">iu</span>
363
+                  <span v-if="prescription.anticoagulant == 1">mg</span>
364
+
365
+                </div>
366
+                <div class="inline_block" style="margin-left:20px;">
363 367
                   维持:
364
-                    <div v-if="prescription.anticoagulant == 1"  class="under_line" style="width: 50px;text-align: center;">
365
-                      {{prescription.anticoagulant_weichi?prescription.anticoagulant_weichi:"/"}}
366
-                    </div>
367
-                    <div v-if="prescription.anticoagulant != 1"  class="under_line" style="width: 50px;text-align: center;">
368
-                      {{prescription.anticoagulant_weichi?prescription.anticoagulant_weichi:"0"}}
369
-                    </div>
370
-                    <span v-if="prescription.anticoagulant != 5">lu</span>
371
-                    <span v-if="prescription.anticoagulant == 5">ml/h</span>
368
+                  <div v-if="prescription.anticoagulant == 1"  class="under_line" style="width: 50px;text-align: center;">
369
+                    {{prescription.anticoagulant_weichi?prescription.anticoagulant_weichi:"/"}}
372 370
                   </div>
373
-                  <div class="inline_block" style="margin-left:20px;" v-if="prescription.anticoagulant == 5">
374
-                    钙名称:
375
-                    <div class="under_line" style="width: 150px;text-align: center;">
376
-                      {{prescription.anticoagulant_gaimingcheng?prescription.anticoagulant_gaimingcheng:'/'}}
377
-                    </div>
371
+                  <div v-if="prescription.anticoagulant != 1"  class="under_line" style="width: 50px;text-align: center;">
372
+                    {{prescription.anticoagulant_weichi?prescription.anticoagulant_weichi:"0"}}
378 373
                   </div>
379
-                  <div class="inline_block" style="margin-left:20px;" v-if="prescription.anticoagulant == 5">
380
-                    钙剂量:
381
-                    <div class="under_line" style="width: 50px;text-align: center;">
382
-                      {{prescription.anticoagulant_gaijiliang?prescription.anticoagulant_gaijiliang:'/'}}
383
-                    </div>
384
-                    ml/h
374
+                  <span v-if="prescription.anticoagulant == 5">ml</span>
375
+                  <span v-if="prescription.anticoagulant == 4">mg</span>
376
+                  <span v-if="prescription.anticoagulant == 3">iu</span>
377
+                  <span v-if="prescription.anticoagulant == 2">iu</span>
378
+                  <span v-if="prescription.anticoagulant == 1">mg</span>
379
+
380
+                </div>
381
+                <div class="inline_block" style="margin-left:20px;" v-if="prescription.anticoagulant == 5">
382
+                  钙名称:
383
+                  <div class="under_line" style="width: 150px;text-align: center;">
384
+                    {{prescription.anticoagulant_gaimingcheng?prescription.anticoagulant_gaimingcheng:'/'}}
385
+                  </div>
386
+                </div>
387
+                <div class="inline_block" style="margin-left:20px;" v-if="prescription.anticoagulant == 5">
388
+                  钙剂量:
389
+                  <div class="under_line" style="width: 50px;text-align: center;">
390
+                    {{prescription.anticoagulant_gaijiliang?prescription.anticoagulant_gaijiliang:'/'}}
385 391
                   </div>
386
-                  <div class="inline_block" style="margin-left:20px;" v-if="prescription.anticoagulant != 5">
392
+                  ml
393
+                </div>
394
+                <div class="inline_block" style="margin-left:20px;" v-if="prescription.anticoagulant != 5">
387 395
                   总量:
388
-                    <div class="under_line" style="width: 50px;text-align: center;">
389
-                      {{prescription.anticoagulant_zongliang?prescription.anticoagulant_zongliang:'/'}}
390
-                    </div>
391
-                    lu
396
+                  <div class="under_line" style="width: 50px;text-align: center;">
397
+                    {{prescription.anticoagulant_zongliang?prescription.anticoagulant_zongliang:'/'}}
392 398
                   </div>
393
-                  <div class="inline_block" style="margin-left:20px;">
399
+                  <span v-if="prescription.anticoagulant == 4">mg</span>
400
+                  <span v-if="prescription.anticoagulant == 3">iu</span>
401
+                  <span v-if="prescription.anticoagulant == 2">iu</span>
402
+                  <span v-if="prescription.anticoagulant == 1">mg</span>
403
+
404
+                </div>
405
+                <div class="inline_block" style="margin-left:20px;">
394 406
                   透析机号:
395 407
                   <div class="under_line" style="width: 50px;text-align: center;">
396 408
                     {{dialysisOrder&&dialysisOrder.DeviceNumber&&dialysisOrder.DeviceNumber.number.length > 0?dialysisOrder.DeviceNumber.number:patientInfo.DialysisSchedule.device_number.number}}

+ 0 - 41
src/xt_pages/home/index.vue Wyświetl plik

@@ -113,47 +113,6 @@
113 113
           ></el-pagination>
114 114
         </div>
115 115
 
116
-        <el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button>
117
-
118
-        <el-dialog title="病人姓名" :visible.sync="dialogVisible" width="30%">
119
-          <div class="newLine">
120
-            <span>本次透析日期</span>
121
-            <span>123</span>
122
-          </div>
123
-          <div class="newLine">
124
-            <span>透前体重(kg)</span>
125
-            <span>123</span>
126
-          </div>
127
-          <div class="newLine">
128
-            <span>干体重(kg)</span>
129
-            <span>123</span>
130
-          </div>
131
-          <div class="newLine">
132
-            <span>衣物重(kg)</span>
133
-            <span>123</span>
134
-          </div>
135
-          <div class="newLine">
136
-            <span>体重增加(kg)</span>
137
-            <span>123</span>
138
-          </div>
139
-          <div class="newLine">
140
-            <span>透后体重(kg)</span>
141
-            <span>123</span>
142
-          </div>
143
-          <div class="newLine">
144
-            <span>体重减少(kg)</span>
145
-            <span>123</span>
146
-          </div>
147
-          <div class="newLine">
148
-            <span>上次透后体重(kg)</span>
149
-            <span>123</span>
150
-          </div>
151
-
152
-          <span slot="footer" class="dialog-footer">
153
-            <el-button @click="dialogVisible = false">取 消</el-button>
154
-            <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
155
-          </span>
156
-        </el-dialog>
157 116
       </div>
158 117
     </section>
159 118
   </div>

+ 89 - 99
src/xt_pages/user/doctorAdvice.vue Wyświetl plik

@@ -1,25 +1,25 @@
1 1
 <template>
2 2
   <div class="patient-container">
3 3
 
4
-    <el-dialog title="透析处方长期医嘱医生确认推送提醒" :visible.sync="dialogConfigVisible">
5
-      <el-form>
6
-        <el-form-item label="是否开启推送:">
7
-          <el-radio-group v-model="is_open_remind" @change="changeRemind">
8
-            <el-radio :label="1">开启</el-radio>
9
-            <el-radio :label="2">不开启</el-radio>
10
-          </el-radio-group>
11
-        </el-form-item>
12
-      </el-form>
13
-
14
-    </el-dialog>
4
+    <!--<el-dialog title="透析处方长期医嘱医生确认推送提醒" :visible.sync="dialogConfigVisible">-->
5
+    <!--<el-form>-->
6
+    <!--<el-form-item label="是否开启推送:">-->
7
+    <!--<el-radio-group v-model="is_open_remind" @change="changeRemind">-->
8
+    <!--<el-radio :label="1">开启</el-radio>-->
9
+    <!--<el-radio :label="2">不开启</el-radio>-->
10
+    <!--</el-radio-group>-->
11
+    <!--</el-form-item>-->
12
+    <!--</el-form>-->
13
+
14
+    <!--</el-dialog>-->
15 15
 
16 16
     <patient-sidebar :id="patientID" defaultActive="1-4" v-on:tran-patient="onTranPatient"></patient-sidebar>
17 17
     <div class="patient-app-container advice-container app-container">
18 18
       <div class="cellButton" style="float:right;">
19
-        <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" size="small"
20
-                   @click="dialogConfigVisible = true"
21
-                   type="primary" icon="el-icon-circle-plus-outline">长期医嘱提醒配置
22
-        </el-button>
19
+        <!--<el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" size="small"-->
20
+        <!--@click="dialogConfigVisible = true"-->
21
+        <!--type="primary" icon="el-icon-circle-plus-outline">长期医嘱提醒配置-->
22
+        <!--</el-button>-->
23 23
         <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" size="small" @click="openNew"
24 24
                    type="primary" icon="el-icon-circle-plus-outline">新增
25 25
         </el-button>
@@ -63,13 +63,13 @@
63 63
                         :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"
64 64
                         :picker-options="pickerOptions" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
65 65
       </div>
66
-      <el-table id="oictable" @cell-click="clickuseradvicecell" :header-cell-style="{
67
-                  backgroundColor: 'rgb(245, 247, 250)',
68
-                  color: '#606266'
69
-                }"
70
-                :row-style="{ color: '#303133' }"  row-class-name="user-advice-table-row" :span-method="mergeSpan" ref="multipleTable" :data="adviceTableData" border fit highlight-current-row @select="selectAdvice" @selection-change="changeAdvice" style="width: 100%;margin-top: 10px;" :cell-class-name="adviceNameShow" >
66
+      <el-table id="oictable" @cell-click="clickuseradvicecell"
67
+                :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" row-class-name="user-advice-table-row"
68
+                :span-method="mergeSpan" ref="multipleTable" :data="adviceTableData" border fit highlight-current-row
69
+                @select="selectAdvice" @selection-change="changeAdvice" style="width: 100%;margin-top: 10px;"
70
+                :cell-class-name="adviceNameShow">
71 71
 
72
-      <el-table-column align="center" label="全选" width="60px" type="selection" fixed></el-table-column>
72
+        <el-table-column align="center" label="全选" width="60px" type="selection" fixed></el-table-column>
73 73
         <!--<el-table-column type="index" :index="indexMethod"  label="序号" width="60px" align="center"></el-table-column>-->
74 74
         <el-table-column label="期效" width="60px" property="advice_type" align="center" fixed>
75 75
           <template slot-scope="scope">
@@ -94,7 +94,7 @@
94 94
 
95 95
               <el-dropdown-menu slot="dropdown">
96 96
                 <!--<el-dropdown-item :disabled="$store.getters.xt_user.subscibe.state==3?true:false"-->
97
-                                  <!--@click.native="openEdit(scope.$index, scope.row)">修改医嘱-->
97
+                <!--@click.native="openEdit(scope.$index, scope.row)">修改医嘱-->
98 98
                 <!--</el-dropdown-item>-->
99 99
                 <el-dropdown-item v-if="scope.row.advice_type == 1"
100 100
                                   :disabled="$store.getters.xt_user.subscibe.state==3?true:false"
@@ -396,7 +396,7 @@
396 396
         <div slot="footer" class="dialog-footer">
397 397
           <el-button
398 398
             :disabled="$store.getters.xt_user.subscibe.state==3 || groupForm.adviceNames.length == 0?true:false"
399
-            type="primary" @click="submitgroupAdvice('groupForm')">保 存
399
+            type="primary" @click="submitgroupAdvice('groupForm')" :loading="addLoading">保 存
400 400
           </el-button>
401 401
         </div>
402 402
       </el-dialog>
@@ -1415,7 +1415,6 @@
1415 1415
                   duration: 2000
1416 1416
                 })
1417 1417
 
1418
-
1419 1418
                 this.dialogFormVisible = false
1420 1419
                 this.resetForm(formName)
1421 1420
                 var advice = response.data.data.advice
@@ -1499,7 +1498,7 @@
1499 1498
                     }
1500 1499
                     if (
1501 1500
                       response.data.data.advices[index].parent_id in childMap ===
1502
-                    false
1501
+                      false
1503 1502
                     ) {
1504 1503
                       childMap[response.data.data.advices[index].parent_id] = []
1505 1504
                     }
@@ -2168,20 +2167,20 @@
2168 2167
           this.adviceForm.advice_desc = this.adviceTemplateMaps[key].advice_desc
2169 2168
           this.adviceForm.single_dose_unit = this.adviceTemplateMaps[
2170 2169
             key
2171
-          ].single_dose_unit
2170
+            ].single_dose_unit
2172 2171
           this.adviceForm.single_dose =
2173 2172
             this.adviceTemplateMaps[key].single_dose + ''
2174 2173
           this.adviceForm.prescribing_number_unit = this.adviceTemplateMaps[
2175 2174
             key
2176
-          ].prescribing_number_unit
2175
+            ].prescribing_number_unit
2177 2176
           this.adviceForm.prescribing_number =
2178 2177
             this.adviceTemplateMaps[key].prescribing_number + ''
2179 2178
           this.adviceForm.delivery_way = this.adviceTemplateMaps[
2180 2179
             key
2181
-          ].delivery_way
2180
+            ].delivery_way
2182 2181
           this.adviceForm.execution_frequency = this.adviceTemplateMaps[
2183 2182
             key
2184
-          ].execution_frequency
2183
+            ].execution_frequency
2185 2184
         }
2186 2185
       },
2187 2186
       indexMethod(index) {
@@ -2426,6 +2425,7 @@
2426 2425
         getDoctorAdviceList(this.listQuery).then(response => {
2427 2426
           if (response.data.state == 1) {
2428 2427
             this.adviceTableData = response.data.data.advices
2428
+            console.log('数据是什么', this.adviceTableData)
2429 2429
             this.operators = response.data.data.operators
2430 2430
             if (this.operators.length > 0) {
2431 2431
               var operatorsLen = this.operators.length
@@ -2662,10 +2662,10 @@
2662 2662
             var item = {
2663 2663
               advice_name: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2664 2664
                 index
2665
-              ].advice_name,
2665
+                ].advice_name,
2666 2666
               advice_desc: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2667 2667
                 index
2668
-              ].advice_desc,
2668
+                ].advice_desc,
2669 2669
               single_dose:
2670 2670
                 '' +
2671 2671
                 this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
@@ -2678,7 +2678,7 @@
2678 2678
                   .drug_spec,
2679 2679
               drug_spec_unit: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2680 2680
                 index
2681
-              ].drug_spec_unit,
2681
+                ].drug_spec_unit,
2682 2682
               prescribing_number:
2683 2683
                 '' +
2684 2684
                 this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
@@ -2687,15 +2687,15 @@
2687 2687
                 .DoctorAdviceTemplate[index].prescribing_number_unit,
2688 2688
               delivery_way: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2689 2689
                 index
2690
-              ].delivery_way,
2690
+                ].delivery_way,
2691 2691
               execution_frequency: this.adviceTemplateMaps[mapid]
2692 2692
                 .DoctorAdviceTemplate[index].execution_frequency,
2693 2693
               advice_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2694 2694
                 index
2695
-              ].id,
2695
+                ].id,
2696 2696
               selection: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2697 2697
                 index
2698
-              ].selection,
2698
+                ].selection,
2699 2699
 
2700 2700
               day_count: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].day_count,
2701 2701
               week_days: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].week_days,
@@ -2715,7 +2715,7 @@
2715 2715
               var parentRow = thisRowKey
2716 2716
               var children = this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2717 2717
                 index
2718
-              ].children
2718
+                ].children
2719 2719
               for (const key in children) {
2720 2720
                 thisRowKey++
2721 2721
                 var child = {
@@ -3034,41 +3034,41 @@
3034 3034
                       if (_this.groupSelectRow.row_key == children[j].row_key) {
3035 3035
                         _this.groupForm.adviceNames[index].children[
3036 3036
                           j
3037
-                        ].advice_name =
3037
+                          ].advice_name =
3038 3038
                           _this.nameForm.advice_name
3039 3039
                         _this.groupForm.adviceNames[index].children[
3040 3040
                           j
3041
-                        ].advice_desc =
3041
+                          ].advice_desc =
3042 3042
                           _this.nameForm.advice_desc
3043 3043
                         _this.groupForm.adviceNames[index].children[
3044 3044
                           j
3045
-                        ].single_dose =
3045
+                          ].single_dose =
3046 3046
                           '' + _this.nameForm.single_dose
3047 3047
                         _this.groupForm.adviceNames[index].children[
3048 3048
                           j
3049
-                        ].single_dose_unit =
3049
+                          ].single_dose_unit =
3050 3050
                           _this.nameForm.single_dose_unit
3051 3051
                         _this.groupForm.adviceNames[index].children[j].drug_spec =
3052 3052
                           '' + _this.nameForm.drug_spec
3053 3053
                         _this.groupForm.adviceNames[index].children[
3054 3054
                           j
3055
-                        ].drug_spec_unit =
3055
+                          ].drug_spec_unit =
3056 3056
                           _this.nameForm.drug_spec_unit
3057 3057
                         _this.groupForm.adviceNames[index].children[
3058 3058
                           j
3059
-                        ].prescribing_number =
3059
+                          ].prescribing_number =
3060 3060
                           '' + _this.nameForm.prescribing_number
3061 3061
                         _this.groupForm.adviceNames[index].children[
3062 3062
                           j
3063
-                        ].prescribing_number_unit =
3063
+                          ].prescribing_number_unit =
3064 3064
                           _this.nameForm.prescribing_number_unit
3065 3065
                         _this.groupForm.adviceNames[index].children[
3066 3066
                           j
3067
-                        ].delivery_way =
3067
+                          ].delivery_way =
3068 3068
                           _this.nameForm.delivery_way
3069 3069
                         _this.groupForm.adviceNames[index].children[
3070 3070
                           j
3071
-                        ].execution_frequency =
3071
+                          ].execution_frequency =
3072 3072
                           _this.nameForm.execution_frequency
3073 3073
 
3074 3074
                         _this.$set(
@@ -3083,7 +3083,6 @@
3083 3083
                   }
3084 3084
                 }
3085 3085
               } else {
3086
-                console.log('111111')
3087 3086
                 for (let index = 0; index < ale; index++) {
3088 3087
                   if (
3089 3088
                     _this.groupSelectRow.row_key ==
@@ -3094,8 +3093,6 @@
3094 3093
                     _this.groupForm.adviceNames[index].advice_desc =
3095 3094
                       _this.nameForm.advice_desc
3096 3095
 
3097
-
3098
-
3099 3096
                     _this.groupForm.adviceNames[index].single_dose =
3100 3097
                       '' + _this.nameForm.single_dose
3101 3098
                     _this.groupForm.adviceNames[index].single_dose_unit =
@@ -3368,29 +3365,29 @@
3368 3365
       }
3369 3366
       this.listQuery.id = this.patientID
3370 3367
 
3371
-      var nowDate = new Date()
3372
-      var nowYear = nowDate.getFullYear()
3373
-      var nowMonth = nowDate.getMonth() + 1
3374
-      var nowDay = nowDate.getDate()
3375
-
3376
-      this.listQuery.end_time =
3377
-        nowYear +
3378
-        '-' +
3379
-        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
3380
-        '-' +
3381
-        (nowDay < 10 ? '0' + nowDay : nowDay)
3382
-
3383
-      nowDate.setMonth(nowDate.getMonth() - 1)
3384
-      nowYear = nowDate.getFullYear()
3385
-      nowMonth = nowDate.getMonth() + 1
3386
-      nowDay = nowDate.getDate()
3387
-
3388
-      this.listQuery.start_time =
3389
-        nowYear +
3390
-        '-' +
3391
-        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
3392
-        '-' +
3393
-        (nowDay < 10 ? '0' + nowDay : nowDay)
3368
+      // var nowDate = new Date()
3369
+      // var nowYear = nowDate.getFullYear()
3370
+      // var nowMonth = nowDate.getMonth() + 1
3371
+      // var nowDay = nowDate.getDate()
3372
+
3373
+      // this.listQuery.end_time =
3374
+      //   nowYear +
3375
+      //   '-' +
3376
+      //   (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
3377
+      //   '-' +
3378
+      //   (nowDay < 10 ? '0' + nowDay : nowDay)
3379
+      //
3380
+      // nowDate.setMonth(nowDate.getMonth() - 1)
3381
+      // nowYear = nowDate.getFullYear()
3382
+      // nowMonth = nowDate.getMonth() + 1
3383
+      // nowDay = nowDate.getDate()
3384
+      //
3385
+      // this.listQuery.start_time =
3386
+      //   nowYear +
3387
+      //   '-' +
3388
+      //   (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
3389
+      //   '-' +
3390
+      //   (nowDay < 10 ? '0' + nowDay : nowDay)
3394 3391
 
3395 3392
       // this.fetchAllDoctorAndNurse();
3396 3393
       this.fetchAllAdminUsers()
@@ -3601,33 +3598,26 @@
3601 3598
     transform: rotate(90deg) !important;
3602 3599
   }
3603 3600
 
3604
-.user-advice-table-row:hover > td {
3605
-  background: #fff !important;
3606
-}
3607
-.user-advice-table-row td:hover {
3608
-  background: #fff !important;
3609
-}
3610
-#user-advice-select-template-table .el-table__row {
3611
-  display: table-row !important;
3612
-}
3613
-#user-advice-select-template-table .el-table__expand-icon {
3614
-  -webkit-transform: rotate(90deg) !important;
3615
-  transform: rotate(90deg) !important;
3616
-}
3617
-.advicenamedisplay .cell {
3618
-    /* float: left; */
3619
-    text-align: center;
3620
-}
3621
-.el-table td,
3622
-.el-table th.is-leaf,
3623
-.el-table--border,
3624
-.el-table--group {
3625
-  border-color: #d0d3da;
3626
-}
3627
-.el-table--border::after,
3628
-.el-table--group::after,
3629
-.el-table::before {
3630
-  background-color: #d0d3da;
3631
-}
3601
+  .user-advice-table-row:hover > td {
3602
+    background: #fff !important;
3603
+  }
3604
+
3605
+  .user-advice-table-row td:hover {
3606
+    background: #fff !important;
3607
+  }
3608
+
3609
+  #user-advice-select-template-table .el-table__row {
3610
+    display: table-row !important;
3611
+  }
3612
+
3613
+  #user-advice-select-template-table .el-table__expand-icon {
3614
+    -webkit-transform: rotate(90deg) !important;
3615
+    transform: rotate(90deg) !important;
3616
+  }
3617
+
3618
+  .advicenamedisplay .cell {
3619
+    float: left;
3620
+    text-align: left;
3621
+  }
3632 3622
 </style>
3633 3623
 

+ 125 - 98
src/xt_pages/workforce/components/tableData.vue Wyświetl plik

@@ -290,7 +290,7 @@
290 290
       <span slot="footer" class="dialog-footer">
291 291
           <el-button @click="msDialogVisible = false">取 消</el-button>
292 292
           <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary"
293
-                     @click="submitTiaoZMS('changeSchedule')">保 存</el-button>
293
+                     @click="submitMode('changeSchedule')">保 存</el-button>
294 294
         </span>
295 295
     </el-dialog>
296 296
     <el-dialog
@@ -936,6 +936,38 @@
936 936
           }
937 937
         })
938 938
       },
939
+      submitMode(formName) {
940
+            this.changing_mode = true
941
+            this.changeSchedule.change_action = 'change_mode'
942
+            ChangeSchedule(this.currentData.id, this.changeSchedule).then(response => {
943
+              if (response.data.state == 0) {
944
+                this.$message.error(response.data.msg)
945
+              } else {
946
+                this.$message({
947
+                  type: 'success',
948
+                  message: '修改成功!'
949
+                })
950
+                var that = this
951
+                var schedule = response.data.data.schedule
952
+                this.scheduleZone.forEach(function(zone, index) {
953
+                  if (zone.zone_id == schedule.partition_id && zone.jihao_id == schedule.bed_id) {
954
+                    var weekPath = that.weekPath(schedule.schedule_week, schedule.schedule_type)
955
+                    if (weekPath.length == 2) {
956
+                      var weekPathKey = weekPath[0] + '_' + weekPath[1]
957
+                      that.scheduleZone[index][weekPathKey].mode_id = schedule.mode_id
958
+                      that.scheduleZone[index][weekPathKey].mode_name = typeof (that.modeOptions[schedule.mode_id]) === 'undefined' ? '' : that.modeOptions[schedule.mode_id].name
959
+                    }
960
+                  }
961
+                })
962
+                this.msDialogVisible = false
963
+              }
964
+              this.changing_mode = false
965
+            }).catch(err => {
966
+              this.$message.error(err)
967
+              this.changing_mode = false
968
+            })
969
+      },
970
+
939 971
       submitTiaoZMS(formName) {
940 972
         this.$refs[formName].validate((valid) => {
941 973
           if (valid) {
@@ -978,51 +1010,55 @@
978 1010
         this.device_id = this.current_devices[0].id
979 1011
       }, changeScheduleType(schedule_type) {
980 1012
         const params = {
981
-          type: schedule_type
1013
+          type: schedule_type,
1014
+          date: this.currentData.schedule_date,
1015
+
982 1016
         }
983 1017
         getUrgentScheduleInitData(params).then(rs => {
984 1018
           if (rs.data.state == 1) {
985 1019
             this.origin_schedules = rs.data.data.schedules
986
-            this.patients = rs.data.data.patients
987
-            this.modes = rs.data.data.modes
988 1020
             this.origin_device_numbers = rs.data.data.device_numbers
989 1021
 
990
-            for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
991
-              for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
992
-                if (this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id) {
993
-                  this.origin_device_numbers.splice(y, 1)
994
-                }
1022
+            var zone_device_map = {};
1023
+            for (
1024
+              let index = 0;
1025
+              index < this.origin_device_numbers.length;
1026
+              index++
1027
+            ) {
1028
+              const device_number = this.origin_device_numbers[index];
1029
+              if (
1030
+                zone_device_map[device_number.zone_name] == null ||
1031
+                zone_device_map[device_number.zone_name] == undefined
1032
+              ) {
1033
+                zone_device_map[device_number.zone_name] = [];
995 1034
               }
1035
+              zone_device_map[device_number.zone_name].push(device_number);
996 1036
             }
1037
+            this.zone_device_map = zone_device_map;
997 1038
 
998
-            var zone_device_map = {}
999
-            for (let index = 0; index < this.origin_device_numbers.length; index++) {
1000
-              const device_number = this.origin_device_numbers[index]
1001
-              if (zone_device_map[device_number.zone.name] == null || zone_device_map[device_number.zone.name] == undefined) {
1002
-                zone_device_map[device_number.zone.name] = []
1003
-              }
1004
-              zone_device_map[device_number.zone.name].push(device_number)
1005
-            }
1006
-            this.zone_device_map = zone_device_map
1007
-            // debugger
1039
+            this.zone_names = Object.keys(this.zone_device_map);
1040
+
1041
+            console.log(this.current_devices)
1008 1042
 
1009
-            this.zone_names = Object.keys(this.zone_device_map)
1010 1043
             if (this.zone_names.length > 0) {
1011
-              this.zone_name = this.zone_names[0]
1012
-              this.current_devices = this.zone_device_map[this.zone_name]
1013
-              this.device_id = this.current_devices[0].id
1044
+              this.zone_name = this.zone_names[0];
1045
+              this.current_devices = this.zone_device_map[this.zone_name];
1046
+              this.device_id = this.current_devices[0].id;
1014 1047
             }
1048
+            console.log(this.current_devices)
1049
+
1050
+
1015 1051
             this.zone_device_options = [
1016 1052
               { values: this.zone_names },
1017 1053
               // { values: this.getDeviceNumberNames(this.current_devices) },
1018 1054
               { values: this.current_devices }
1019
-            ]
1055
+            ];
1056
+
1057
+            console.log(this.current_devices)
1020 1058
           } else {
1021
-            Toast.fail(rs.data.msg)
1022 1059
           }
1023 1060
         }).catch(err => {
1024 1061
           this.loading = false
1025
-          Toast.fail(err)
1026 1062
         })
1027 1063
       },
1028 1064
       submitTiaoX() {
@@ -1055,50 +1091,89 @@
1055 1091
             } else {
1056 1092
               this.jihaos = []
1057 1093
             }
1094
+
1058 1095
             const params = {
1059 1096
               type: this.currentData.schedule_type,
1060
-              date: this.currentData.schedule_date
1097
+              date: this.currentData.schedule_date,
1061 1098
             }
1062 1099
             getUrgentScheduleInitData(params).then(response => {
1063 1100
               if (response.data.state == 0) {
1064 1101
                 this.$message.error(response.data.msg)
1065 1102
               } else {
1066 1103
                 if (response.data.state == 1) {
1104
+
1067 1105
                   this.origin_schedules = response.data.data.schedules
1068 1106
                   this.origin_device_numbers = response.data.data.device_numbers
1069 1107
 
1070
-                  for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
1071
-                    for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
1072
-                      if (this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id) {
1073
-                        this.origin_device_numbers.splice(y, 1)
1074
-                      }
1075
-                    }
1076
-                  }
1077
-                  // debugger
1078
-                  var zone_device_map = {}
1079
-                  for (let index = 0; index < this.origin_device_numbers.length; index++) {
1080
-                    const device_number = this.origin_device_numbers[index]
1081
-                    if (zone_device_map[device_number.zone.name] == null || zone_device_map[device_number.zone.name] == undefined) {
1082
-                      zone_device_map[device_number.zone.name] = []
1108
+
1109
+                  var zone_device_map = {};
1110
+                  for (
1111
+                    let index = 0;
1112
+                    index < this.origin_device_numbers.length;
1113
+                    index++
1114
+                  ) {
1115
+                    const device_number = this.origin_device_numbers[index];
1116
+                    if (
1117
+                      zone_device_map[device_number.zone_name] == null ||
1118
+                      zone_device_map[device_number.zone_name] == undefined
1119
+                    ) {
1120
+                      zone_device_map[device_number.zone_name] = [];
1083 1121
                     }
1084
-                    zone_device_map[device_number.zone.name].push(device_number)
1122
+                    zone_device_map[device_number.zone_name].push(device_number);
1085 1123
                   }
1086
-                  this.zone_device_map = zone_device_map
1087
-
1088
-                  this.zone_names = Object.keys(this.zone_device_map)
1124
+                  this.zone_device_map = zone_device_map;
1125
+                  this.zone_names = Object.keys(this.zone_device_map);
1089 1126
                   if (this.zone_names.length > 0) {
1090
-                    this.zone_name = this.zone_names[0]
1091
-                    this.current_devices = this.zone_device_map[this.zone_name]
1092
-                    this.device_id = this.current_devices[0].id
1093
-                  }
1127
+                    this.zone_name = this.zone_names[0];
1128
+                    this.current_devices = this.zone_device_map[this.zone_name];
1129
+
1130
+                    console.log(this.zone_device_map[this.zone_name])
1094 1131
 
1132
+                    this.device_id = this.current_devices[0].id;
1133
+                  }
1095 1134
                   this.zone_device_options = [
1096 1135
                     { values: this.zone_names },
1097 1136
                     // { values: this.getDeviceNumberNames(this.current_devices) },
1098 1137
                     { values: this.current_devices }
1099
-                  ]
1138
+                  ];
1139
+
1140
+
1141
+
1142
+
1143
+
1144
+
1145
+                  //
1146
+                  // for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
1147
+                  //   for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
1148
+                  //     if (this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id) {
1149
+                  //       this.origin_device_numbers.splice(y, 1)
1150
+                  //     }
1151
+                  //   }
1152
+                  // }
1153
+                  // // debugger
1154
+                  // var zone_device_map = {}
1155
+                  // for (let index = 0; index < this.origin_device_numbers.length; index++) {
1156
+                  //   const device_number = this.origin_device_numbers[index]
1157
+                  //   if (zone_device_map[device_number.zone.name] == null || zone_device_map[device_number.zone.name] == undefined) {
1158
+                  //     zone_device_map[device_number.zone.name] = []
1159
+                  //   }
1160
+                  //   zone_device_map[device_number.zone.name].push(device_number)
1161
+                  // }
1162
+                  // this.zone_device_map = zone_device_map
1163
+                  //
1164
+                  // this.zone_names = Object.keys(this.zone_device_map)
1165
+                  // if (this.zone_names.length > 0) {
1166
+                  //   this.zone_name = this.zone_names[0]
1167
+                  //   this.current_devices = this.zone_device_map[this.zone_name]
1168
+                  //   this.device_id = this.current_devices[0].id
1169
+                  // }
1170
+                  //
1171
+                  // this.zone_device_options = [
1172
+                  //   { values: this.zone_names },
1173
+                  //   // { values: this.getDeviceNumberNames(this.current_devices) },
1174
+                  //   { values: this.current_devices }
1175
+                  // ]
1100 1176
                 } else {
1101
-                  Toast.fail(rs.data.msg)
1102 1177
                 }
1103 1178
               }
1104 1179
             }).catch(err => {
@@ -1328,54 +1403,6 @@
1328 1403
         } else {
1329 1404
           this.jihaos = []
1330 1405
         }
1331
-        const params = {
1332
-          type: row.schedule_type
1333
-        }
1334
-        getUrgentScheduleInitData(params).then(response => {
1335
-          if (response.data.state == 0) {
1336
-            this.$message.error(response.data.msg)
1337
-          } else {
1338
-            if (response.data.state == 1) {
1339
-              this.origin_schedules = response.data.data.schedules
1340
-              this.origin_device_numbers = response.data.data.device_numbers
1341
-
1342
-              for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
1343
-                for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
1344
-                  if (this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id) {
1345
-                    this.origin_device_numbers.splice(y, 1)
1346
-                  }
1347
-                }
1348
-              }
1349
-
1350
-              var zone_device_map = {}
1351
-              for (let index = 0; index < this.origin_device_numbers.length; index++) {
1352
-                const device_number = this.origin_device_numbers[index]
1353
-                if (zone_device_map[device_number.zone.name] == null || zone_device_map[device_number.zone.name] == undefined) {
1354
-                  zone_device_map[device_number.zone.name] = []
1355
-                }
1356
-                zone_device_map[device_number.zone.name].push(device_number)
1357
-              }
1358
-              this.zone_device_map = zone_device_map
1359
-
1360
-              this.zone_names = Object.keys(this.zone_device_map)
1361
-              if (this.zone_names.length > 0) {
1362
-                this.zone_name = this.zone_names[0]
1363
-                this.current_devices = this.zone_device_map[this.zone_name]
1364
-                this.device_id = this.current_devices[0].id
1365
-              }
1366
-
1367
-              this.zone_device_options = [
1368
-                { values: this.zone_names },
1369
-                // { values: this.getDeviceNumberNames(this.current_devices) },
1370
-                { values: this.current_devices }
1371
-              ]
1372
-            } else {
1373
-              Toast.fail(rs.data.msg)
1374
-            }
1375
-          }
1376
-        }).catch(err => {
1377
-          this.$message.error(err)
1378
-        })
1379 1406
 
1380 1407
         this.searchTableVisible = false
1381 1408
         this.jhDialogVisible = true