Procházet zdrojové kódy

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

XMLWAN před 4 roky
rodič
revize
6961415777

+ 15 - 0
src/api/advice.js Zobrazit soubor

@@ -296,7 +296,22 @@ export function postDoctorAdviceConfig(params) {
296 296
 
297 297
 
298 298
 
299
+export function getDoctorInitConfig() {
300
+  return request({
301
+    url: '/api/advicetemplate/init/get',
302
+    method: 'get',
303
+  })
304
+}
305
+
299 306
 
307
+export function PostInitAdviceTemplate(params) {
308
+  return request({
309
+    url: '/api/advicetemplate/init/commit',
310
+    method: 'post',
311
+    params:params
312
+
313
+  })
314
+}
300 315
 
301 316
 
302 317
 

+ 44 - 0
src/api/config.js Zobrazit soubor

@@ -48,3 +48,47 @@ export function getIsDocking(params) {
48 48
   })
49 49
 }
50 50
 
51
+
52
+
53
+
54
+
55
+export function getAllSystemPrescription() {
56
+  return request({
57
+    url: '/api/systemprescription/all',
58
+    method: 'get',
59
+  })
60
+}
61
+
62
+
63
+export function getSystemPrescription(params) {
64
+  return request({
65
+    url: '/api/systemprescription/get',
66
+    method: 'get',
67
+    params:params
68
+
69
+  })
70
+}
71
+
72
+
73
+export function postSystemPrescription(params) {
74
+  return request({
75
+    url: '/api/systemprescription/commit',
76
+    method: 'post',
77
+    data: params
78
+
79
+  })
80
+}
81
+
82
+
83
+export function updateSystemPrescription(id,params) {
84
+  return request({
85
+    url: '/api/systemprescription/update?id='+id,
86
+    method: 'post',
87
+    data: params
88
+
89
+  })
90
+}
91
+
92
+
93
+
94
+

+ 2 - 1
src/lang/zh.js Zobrazit soubor

@@ -164,7 +164,8 @@ export default {
164 164
     export: '一键导出',
165 165
     upload_config: '质控上报配置',
166 166
     quality_control: '质控上报',
167
-    remind_print: '排版提醒打印'
167
+    remind_print: '排版提醒打印',
168
+    system_prescription:"透析方案",
168 169
 
169 170
   },
170 171
   navbar: {

+ 10 - 4
src/router/modules/systems.js Zobrazit soubor

@@ -82,8 +82,14 @@ export default {
82 82
     meta: {
83 83
       title: 'template'
84 84
     }
85
-  },
86
-  {
85
+  },{
86
+      path: '/data/prescription',
87
+      component: () => import('@/xt_pages/data/prescription'),
88
+      name: 'prescription',
89
+      meta: {
90
+        title: 'system_prescription'
91
+      }
92
+    }, {
87 93
     path: '/data/druguse',
88 94
     component: () => import('@/xt_pages/data/druguseTemplate'),
89 95
     name: 'druguse',
@@ -97,7 +103,7 @@ export default {
97 103
     meta: {
98 104
       title: 'showconfig'
99 105
     }
100
-  }, {
106
+  },{
101 107
     path: '/data/print',
102 108
     component: () => import('@/xt_pages/data/printTemplate'),
103 109
     name: 'printTemplate',
@@ -111,6 +117,6 @@ export default {
111 117
     meta: {
112 118
       title: 'hisconfig'
113 119
     }
114
-  }
120
+  },
115 121
   ]
116 122
 }

+ 55 - 4
src/xt_pages/data/druguseTemplate.vue Zobrazit soubor

@@ -22,7 +22,15 @@
22 22
           <div>
23 23
             <div class="filter-container">
24 24
               <el-button size="small"
25
+                         :loading="loading"
25 26
                          style="float: right;"
27
+                         :disabled="is_init?true:false"
28
+                         @click="initAdvice()"
29
+                         type="primary">医嘱初始化
30
+              </el-button>
31
+
32
+              <el-button size="small"
33
+                         style="float: right;margin-left: 10px;margin-right: 10px"
26 34
                          @click="dialogConfigVisible = true"
27 35
                          type="primary">长期医嘱提醒配置
28 36
               </el-button>
@@ -1187,7 +1195,9 @@
1187 1195
     UpdateExecutionFrequency,
1188 1196
     updateTemplateName,
1189 1197
     getDoctorAdviceConfig,
1190
-    postDoctorAdviceConfig
1198
+    postDoctorAdviceConfig,
1199
+    PostInitAdviceTemplate,
1200
+    getDoctorInitConfig,
1191 1201
   } from '@/api/advice'
1192 1202
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
1193 1203
 
@@ -1219,6 +1229,7 @@
1219 1229
         isEdit: false,
1220 1230
         dialogTitle: '',
1221 1231
         is_open_remind:0,
1232
+        is_init:0,
1222 1233
         isAddChild: false,
1223 1234
         parent_id: 0,
1224 1235
         editDialogTitle: '编辑医嘱',
@@ -1242,7 +1253,7 @@
1242 1253
           name: ''
1243 1254
 
1244 1255
         },
1245
-
1256
+        loading:false,
1246 1257
         drugways: [],
1247 1258
         executionFrequencyOptions: [],
1248 1259
         drugdicRules: {
@@ -1350,8 +1361,34 @@
1350 1361
       this.getAdviceConfig()
1351 1362
       this.unitsOption = getDataConfig('hemodialysis', 'units')
1352 1363
       this.getDoctorAdviceConfig()
1364
+      this.getDoctorInitConfig()
1353 1365
     },
1354 1366
     methods: {
1367
+      initAdvice(){
1368
+        this.$confirm('是否进行医嘱初始化操作?', '提示', {
1369
+          confirmButtonText: '确定',
1370
+          cancelButtonText: '取消',
1371
+          type: 'warning'
1372
+        }).then(() => {
1373
+          let params = {
1374
+            is_init:1
1375
+          }
1376
+          this.loading = true
1377
+          PostInitAdviceTemplate(params).then(response => {
1378
+            if (response.data.state == 1) {
1379
+                this.is_init = response.data.data.init_config.is_init
1380
+              this.getAdviceConfig()
1381
+              this.loading = false
1382
+
1383
+            } else {
1384
+              this.loading = false
1385
+              this.$message.error(response.data.msg)
1386
+            }
1387
+          })
1388
+        }).catch(() => {
1389
+          this.loading = false
1390
+        });
1391
+      },
1355 1392
       getDoctorAdviceConfig(){
1356 1393
         getDoctorAdviceConfig().then(response => {
1357 1394
           if (response.data.state == 1) {
@@ -1361,6 +1398,20 @@
1361 1398
           }
1362 1399
         })
1363 1400
       },
1401
+      getDoctorInitConfig(){
1402
+        getDoctorInitConfig().then(response => {
1403
+          if (response.data.state == 1) {
1404
+            if(response.data.data.advice_init == null){
1405
+              this.is_init = 0
1406
+            }else{
1407
+              this.is_init = response.data.data.advice_init.is_init
1408
+            }
1409
+
1410
+          } else {
1411
+            this.$message.error(response.data.msg)
1412
+          }
1413
+        })
1414
+      },
1364 1415
       adviceNameShow({ row, column, rowIndex, columnIndex }) {
1365 1416
         if (columnIndex == 1) {
1366 1417
           return 'templateadvicenamedisplay'
@@ -1489,8 +1540,8 @@
1489 1540
             this.$message.success('添加模版成功')
1490 1541
 
1491 1542
             var template = response.data.data.template
1492
-            if (template.DoctorAdviceTemplate.length > 0) {
1493
-              for (let i = 0; i < template.DoctorAdviceTemplate.length; i++) {
1543
+            if (template.advice_templates.length > 0) {
1544
+              for (let i = 0; i < template.advice_templates.length; i++) {
1494 1545
                 const object = {}
1495 1546
                 const DoctorAdviceTemplate = template.DoctorAdviceTemplate[i]
1496 1547
                 for (const key in DoctorAdviceTemplate) {

+ 901 - 0
src/xt_pages/data/prescription.vue Zobrazit soubor

@@ -0,0 +1,901 @@
1
+<template>
2
+  <div class="app-container ">
3
+
4
+    <div class="dataTitle">透析方案</div>
5
+
6
+    <div class="app-container" style="margin-left: -20px;margin-top: -20px" v-loading="pageLoading"
7
+         element-loading-text="拼命加载中">
8
+      <el-row :gutter="20">
9
+        <el-col :span="7">
10
+          <el-table
11
+            :header-cell-style="{
12
+              backgroundColor: 'rgb(245, 247, 250)',
13
+              color: '#606266'
14
+            }"
15
+            height="450"
16
+            :row-style="{ color: '#303133' }"
17
+            :data="treatment_mode"
18
+            border
19
+            style="width: 100%"
20
+            highlight-current-row
21
+            :row-class-name="tableRows"
22
+            @row-click="onRowClicks"
23
+            ref="singleTable"
24
+          >
25
+            <el-table-column
26
+              label="透析模式"
27
+              align="center">
28
+              <template slot-scope="scope">
29
+                {{ scope.row.name }}
30
+              </template>
31
+            </el-table-column>
32
+
33
+
34
+            <el-table-column
35
+              label="状态"
36
+              width="80"
37
+              align="center">
38
+              <template slot-scope="scope">
39
+                {{getModeStatus(scope.row.id)}}
40
+              </template>
41
+            </el-table-column>
42
+          </el-table>
43
+        </el-col>
44
+        <el-col :span="17" v-loading="itemLoading">
45
+          <div class="filter-container">
46
+
47
+            <el-row :gutter="20">
48
+              <el-col :span="16">
49
+                <div>{{mode_name}}</div>
50
+              </el-col>
51
+              <el-col :span="8">
52
+                <el-button style="float: right;visibility: hidden" size="small" class="filter-item" type="primary"
53
+                           icon="el-icon-edit-outline"
54
+                           @click="openEdit()">修改
55
+                </el-button>
56
+              </el-col>
57
+            </el-row>
58
+
59
+
60
+          </div>
61
+          <div class="filter-container" style="float:right">
62
+            <el-form ref="addPlan" :model="addPlan" label-width="160px" style="border: black">
63
+
64
+              <el-row :gutter="20">
65
+                <el-col :span="8">
66
+                  <el-form-item label="透析时长(h):" prop="dialysis_duration">
67
+                    <el-time-picker
68
+                      v-model="dialysisTimeShow"
69
+                      :picker-options="{
70
+                  selectableRange: '00:01:00 - 23:59:00'
71
+                }"
72
+                      placeholder="透析时长"
73
+                      style="width:100%;"
74
+                      value-format="H:m"
75
+                      format="H:m"
76
+                      @change="selectnDialysisTime"
77
+                    >
78
+                    </el-time-picker>
79
+
80
+                  </el-form-item>
81
+                </el-col>
82
+
83
+                <el-col :span="8">
84
+                  <el-form-item label="血流量(ml/min):" prop="blood_flow_volume">
85
+                    <el-input v-model="addPlan.blood_flow_volume" ></el-input>
86
+                  </el-form-item>
87
+                </el-col>
88
+                <el-col :span="8" v-if="this.$store.getters.xt_user.template_info.template_id == 6">
89
+                  <el-form-item label="目标超滤量(ml) : ">
90
+                    <el-input v-model="addPlan.target_ultrafiltration" type="number" ></el-input>
91
+                  </el-form-item>
92
+                </el-col>
93
+
94
+                <el-col :span="8" v-if="this.$store.getters.xt_user.template_info.template_id != 6">
95
+                  <el-form-item label="目标超滤量(L) : ">
96
+                    <el-input v-model="addPlan.target_ultrafiltration" type="number" ></el-input>
97
+                  </el-form-item>
98
+                </el-col>
99
+
100
+
101
+                <el-col :span="8">
102
+                  <el-form-item label="透析液配方:">
103
+                    <el-select v-model="addPlan.dialysate_formulation" >
104
+                      <el-option v-for="(item,index)  in dialysate_formulation" :label="item.name" :key="index"
105
+                                 :value="item.id"></el-option>
106
+                    </el-select>
107
+                  </el-form-item>
108
+                </el-col>
109
+
110
+                <el-col :span="8">
111
+                  <el-form-item label="抗凝剂:" prop="anticoagulant">
112
+                    <el-select v-model="addPlan.anticoagulant" @change="changeThisAnticoagulant" >
113
+                      <el-option v-for="(item,index)  in anticoagulantsConfit" :label="item.name" :key="index"
114
+                                 :value="item.id"></el-option>
115
+                    </el-select>
116
+                  </el-form-item>
117
+                </el-col>
118
+                <el-col :span="8" v-if="anticoagulant.shouji != -1">
119
+                  <el-form-item :label="'首剂('+anticoagulant.shouji_unit+'): '" prop="anticoagulant_shouji">
120
+                    <el-input v-model="addPlan.anticoagulant_shouji"
121
+                              :disabled="anticoagulant.shouji==1?false:true" type="number"></el-input>
122
+                  </el-form-item>
123
+                </el-col>
124
+                <el-col :span="8" v-if="anticoagulant.weichi != -1">
125
+                  <el-form-item :label="'维持('+anticoagulant.weichi_unit+'): '" prop="anticoagulant_weichi">
126
+                    <el-input v-model="addPlan.anticoagulant_weichi"
127
+                              :disabled="anticoagulant.weichi==1?false:true" type="number"></el-input>
128
+                  </el-form-item>
129
+                </el-col>
130
+                <el-col :span="8" v-if="anticoagulant.zongliang != -1">
131
+                  <el-form-item :label="'总量('+anticoagulant.zongliang_unit+'): '" prop="anticoagulant_zongliang">
132
+                    <el-input v-model="addPlan.anticoagulant_zongliang"
133
+                              :disabled="anticoagulant.zongliang==1?false:true" type="number"></el-input>
134
+                  </el-form-item>
135
+                </el-col>
136
+                <el-col :span="8" v-if="anticoagulant.gaimingcheng != -1">
137
+                  <el-form-item :label="'钙('+anticoagulant.gaimingcheng_unit+'): '" prop="anticoagulant_gaimingcheng">
138
+                    <el-input v-model="addPlan.anticoagulant_gaimingcheng"
139
+                              :disabled="anticoagulant.gaimingcheng==1?false:true"
140
+                              placeholder="钙名称"></el-input>
141
+                  </el-form-item>
142
+                </el-col>
143
+                <el-col :span="8" v-if="anticoagulant.gaijiliang != -1">
144
+                  <el-form-item prop="anticoagulant_gaijiliang">
145
+                    <el-input v-model="addPlan.anticoagulant_gaijiliang"
146
+                              :disabled="anticoagulant.gaijiliang==1?false:true"
147
+                              placeholder="钙剂量"></el-input>
148
+                  </el-form-item>
149
+                </el-col>
150
+                <el-col :span="8">
151
+                  <el-form-item label="置换量(L) : " prop="replacement_total">
152
+                    <el-input v-model="addPlan.replacement_total" type="number"></el-input>
153
+                  </el-form-item>
154
+                </el-col>
155
+
156
+
157
+                <el-col :span="8">
158
+                  <el-form-item label="钾(mmol/L): " prop="kalium">
159
+                    <el-input v-model="addPlan.kalium" ></el-input>
160
+                  </el-form-item>
161
+                </el-col>
162
+                <el-col :span="8">
163
+                  <el-form-item label="钠(mmol/L): " prop="sodium">
164
+                    <el-input v-model="addPlan.sodium" ></el-input>
165
+                  </el-form-item>
166
+                </el-col>
167
+                <el-col :span="8">
168
+                  <el-form-item label="钙(mmol/L): " prop="calcium">
169
+                    <el-input v-model="addPlan.calcium" ></el-input>
170
+                  </el-form-item>
171
+                </el-col>
172
+
173
+                <el-col :span="8">
174
+                  <el-form-item label="透析器/灌流器:">
175
+                    <el-input v-model="addPlan.dialyzer_perfusion_apparatus" ></el-input>
176
+                  </el-form-item>
177
+                </el-col>
178
+
179
+
180
+                <el-col :span="8">
181
+                  <el-form-item label="碳酸氢盐(mmol/L): " prop="bicarbonate">
182
+                    <el-input v-model="addPlan.bicarbonate" ></el-input>
183
+                  </el-form-item>
184
+                </el-col>
185
+                <el-col :span="8">
186
+                  <el-form-item label="葡萄糖(mmol/L): " prop="glucose">
187
+                    <el-input v-model="addPlan.glucose" ></el-input>
188
+                  </el-form-item>
189
+                </el-col>
190
+
191
+
192
+                <el-col :span="8">
193
+                  <el-form-item label="透析液流量(ml/min): " prop="dialysate_flow">
194
+                    <el-input v-model="addPlan.dialysate_flow" ></el-input>
195
+                  </el-form-item>
196
+                </el-col>
197
+                <el-col :span="8">
198
+                  <el-form-item label="透析液温度(℃): " prop="dialysate_temperature">
199
+                    <el-input v-model="addPlan.dialysate_temperature" ></el-input>
200
+                  </el-form-item>
201
+                </el-col>
202
+
203
+                <el-col :span="8">
204
+                  <el-form-item label="电导度(mS/cm): " prop="conductivity">
205
+                    <el-input v-model="addPlan.conductivity" ></el-input>
206
+                  </el-form-item>
207
+                </el-col>
208
+
209
+
210
+                <el-col :span="8">
211
+                  <el-form-item label="体液过多症状:">
212
+                    <el-select v-model="addPlan.body_fluid" >
213
+                      <el-option v-for="(item,index)  in body_fluid_option" :label="item.name" :key="index"
214
+                                 :value="item.id"></el-option>
215
+                    </el-select>
216
+                  </el-form-item>
217
+                </el-col>
218
+
219
+                <el-col :span="8">
220
+                  <el-form-item label="体液过多其他症状">
221
+                    <el-input v-model="addPlan.body_fluid_other" ></el-input>
222
+                  </el-form-item>
223
+                </el-col>
224
+
225
+
226
+                <el-col :span="8">
227
+                  <el-form-item label="透析前使用特殊药物">
228
+                    <el-select v-model="addPlan.special_medicine" placeholder="请选择" style="width:100%;"
229
+                               >
230
+                      <el-option :key="0" label="请选择" :value="0"></el-option>
231
+                      <el-option v-for="(item,index) in special_medicine_option" :label="item.name" :key="index"
232
+                                 :value="item.id"></el-option>
233
+                    </el-select>
234
+                  </el-form-item>
235
+                </el-col>
236
+
237
+                <el-col :span="8">
238
+                  <el-form-item label="使用其他特殊药物">
239
+                    <el-input v-model="addPlan.special_medicine_other" ></el-input>
240
+                  </el-form-item>
241
+                </el-col>
242
+
243
+
244
+                <el-col :span="8">
245
+                  <el-form-item label="置换液:"
246
+                                v-if="current_select == 2 &&this.$store.getters.xt_user.template_info.template_id != 6">
247
+                    <el-select v-model="addPlan.displace_liqui_part" placeholder="请选择">
248
+                      <el-option :key="0" label="请选择" :value="0"></el-option>
249
+                      <el-option v-for="(option, index) in displace_liqui_part_option" :key="index"
250
+                                 :label="option.name" :value="option.id"></el-option>
251
+                    </el-select>
252
+                  </el-form-item>
253
+
254
+
255
+                  <el-form-item label="置换方式:"
256
+                                v-if="current_select == 2 &&this.$store.getters.xt_user.template_info.template_id == 6">
257
+                    <el-select v-model="addPlan.displace_liqui_part" placeholder="请选择" >
258
+                      <el-option :key="0" label="请选择" :value="0"></el-option>
259
+                      <el-option v-for="(option, index) in displace_liqui_part_option" :key="index"
260
+                                 :label="option.name" :value="option.id"></el-option>
261
+                    </el-select>
262
+                  </el-form-item>
263
+
264
+                </el-col>
265
+
266
+                <el-col :span="8" v-if="current_select == 2">
267
+                  <el-form-item label="置换液总量(L)">
268
+                    <el-input v-model="addPlan.displace_liqui_value" ></el-input>
269
+                  </el-form-item>
270
+                </el-col>
271
+
272
+
273
+                <el-col :span="8">
274
+                  <el-form-item label="血管通路:">
275
+                    <el-select v-model="addPlan.blood_access" placeholder="请选择">
276
+                      <el-option :key="0" label="请选择" :value="0"></el-option>
277
+
278
+                      <el-option v-for="(option, index) in blood_access_option" :key="index"
279
+                                 :label="option.name" :value="option.id"></el-option>
280
+                    </el-select>
281
+                  </el-form-item>
282
+                </el-col>
283
+
284
+                <!-- </el-row>
285
+                <el-row :gutter="20" > -->
286
+                <el-col :span="8">
287
+                  <el-form-item label="实际超滤量(L)">
288
+                    <el-input v-model="addPlan.ultrafiltration" ></el-input>
289
+                  </el-form-item>
290
+                </el-col>
291
+
292
+
293
+                <el-col :span="8">
294
+                  <el-form-item label="目标KT/V">
295
+                    <el-input v-model="addPlan.target_ktv" ></el-input>
296
+                  </el-form-item>
297
+                </el-col>
298
+
299
+
300
+              </el-row>
301
+            </el-form>
302
+            <el-button style="float: right" size="small" class="filter-item" type="primary"
303
+                       icon="el-icon-edit-outline"
304
+                       @click="savePrescription()">保存
305
+            </el-button>
306
+          </div>
307
+        </el-col>
308
+      </el-row>
309
+    </div>
310
+
311
+
312
+  </div>
313
+</template>
314
+
315
+<script>
316
+  import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
317
+  import {
318
+    getAllSystemPrescription,
319
+    getSystemPrescription,
320
+    postSystemPrescription,
321
+    updateSystemPrescription
322
+  } from '@/api/config'
323
+
324
+  export default {
325
+    name: 'prescription',
326
+    components: {},
327
+
328
+    data() {
329
+      return {
330
+        dialysisTimeShow: new Date(2018, 1, 1, 3, 0),
331
+        modeOptions: null,
332
+        current_select: 0,
333
+        mode_name: 'HD',
334
+        pageLoading: false,
335
+        itemLoading: false,
336
+        treatment_mode: [// 治疗模式
337
+          {
338
+            id: 1,
339
+            name: 'HD',
340
+            dialysis_duration: 1,
341
+            replacement_way: 2,
342
+            hemodialysis_machine: 1,
343
+            blood_filter: 2,
344
+            perfusion_apparatus: 2,
345
+            blood_flow_volume: 1,
346
+            dialysate_flow: 1,
347
+            kalium: 1,
348
+            sodium: 1,
349
+            calcium: 1,
350
+            bicarbonate: 1
351
+          },
352
+          {
353
+            id: 2,
354
+            name: 'HDF',
355
+            dialysis_duration: 1,
356
+            replacement_way: 1,
357
+            hemodialysis_machine: 2,
358
+            blood_filter: 1,
359
+            perfusion_apparatus: 2,
360
+            blood_flow_volume: 1,
361
+            dialysate_flow: 1,
362
+            kalium: 1,
363
+            sodium: 1,
364
+            calcium: 1,
365
+            bicarbonate: 1
366
+          },
367
+          {
368
+            id: 3,
369
+            name: 'HD+HP',
370
+            dialysis_duration: 1,
371
+            replacement_way: 2,
372
+            hemodialysis_machine: 1,
373
+            blood_filter: 2,
374
+            perfusion_apparatus: 1,
375
+            blood_flow_volume: 1,
376
+            dialysate_flow: 1,
377
+            kalium: 1,
378
+            sodium: 1,
379
+            calcium: 1,
380
+            bicarbonate: 1
381
+          },
382
+          {
383
+            id: 4,
384
+            name: 'HP',
385
+            dialysis_duration: 1,
386
+            replacement_way: 2,
387
+            hemodialysis_machine: 2,
388
+            blood_filter: 2,
389
+            perfusion_apparatus: 1,
390
+            blood_flow_volume: 1,
391
+            dialysate_flow: 2,
392
+            kalium: 2,
393
+            sodium: 2,
394
+            calcium: 2,
395
+            bicarbonate: 2
396
+          },
397
+          {
398
+            id: 5,
399
+            name: 'HF',
400
+            dialysis_duration: 1,
401
+            replacement_way: 1,
402
+            hemodialysis_machine: 2,
403
+            blood_filter: 1,
404
+            perfusion_apparatus: 2,
405
+            blood_flow_volume: 1,
406
+            dialysate_flow: 2,
407
+            kalium: 1,
408
+            sodium: 1,
409
+            calcium: 1,
410
+            bicarbonate: 1
411
+          },
412
+          {
413
+            id: 6,
414
+            name: 'SCUF',
415
+            dialysis_duration: 1,
416
+            replacement_way: 2,
417
+            hemodialysis_machine: 1,
418
+            blood_filter: 2,
419
+            perfusion_apparatus: 2,
420
+            blood_flow_volume: 1,
421
+            dialysate_flow: 2,
422
+            kalium: 2,
423
+            sodium: 2,
424
+            calcium: 2,
425
+            bicarbonate: 2
426
+          },
427
+          {
428
+            id: 7,
429
+            name: 'IUF',
430
+            dialysis_duration: 1,
431
+            replacement_way: 2,
432
+            hemodialysis_machine: 1,
433
+            blood_filter: 2,
434
+            perfusion_apparatus: 2,
435
+            blood_flow_volume: 2,
436
+            dialysate_flow: 2,
437
+            kalium: 2,
438
+            sodium: 2,
439
+            calcium: 2,
440
+            bicarbonate: 2
441
+          },
442
+          {
443
+            id: 8,
444
+            name: 'HFHD',
445
+            dialysis_duration: 1,
446
+            replacement_way: 2,
447
+            hemodialysis_machine: 1,
448
+            blood_filter: 2,
449
+            perfusion_apparatus: 2,
450
+            blood_flow_volume: 1,
451
+            dialysate_flow: 1,
452
+            kalium: 1,
453
+            sodium: 1,
454
+            calcium: 1,
455
+            bicarbonate: 1
456
+          },
457
+          {
458
+            id: 9,
459
+            name: 'HFHD+HP',
460
+            dialysis_duration: 1,
461
+            replacement_way: 2,
462
+            hemodialysis_machine: 1,
463
+            blood_filter: 2,
464
+            perfusion_apparatus: 1,
465
+            blood_flow_volume: 1,
466
+            dialysate_flow: 1,
467
+            kalium: 1,
468
+            sodium: 1,
469
+            calcium: 1,
470
+            bicarbonate: 1
471
+          },
472
+          {
473
+            id: 10,
474
+            name: 'PHF',
475
+            dialysis_duration: 1,
476
+            replacement_way: 1,
477
+            hemodialysis_machine: 2,
478
+            blood_filter: 1,
479
+            perfusion_apparatus: 2,
480
+            blood_flow_volume: 1,
481
+            dialysate_flow: 1,
482
+            kalium: 1,
483
+            sodium: 1,
484
+            calcium: 1,
485
+            bicarbonate: 1
486
+          },
487
+          {
488
+            id: 11,
489
+            name: 'HFR',
490
+            dialysis_duration: 1,
491
+            replacement_way: 2,
492
+            hemodialysis_machine: 2,
493
+            blood_filter: 1,
494
+            perfusion_apparatus: 1,
495
+            blood_flow_volume: 1,
496
+            dialysate_flow: 1,
497
+            kalium: 1,
498
+            sodium: 1,
499
+            calcium: 1,
500
+            bicarbonate: 1
501
+          },
502
+          {
503
+            id: 12,
504
+            name: 'HDF+HP',
505
+            dialysis_duration: 1,
506
+            replacement_way: 1,
507
+            hemodialysis_machine: 2,
508
+            blood_filter: 1,
509
+            perfusion_apparatus: 1,
510
+            blood_flow_volume: 1,
511
+            dialysate_flow: 1,
512
+            kalium: 1,
513
+            sodium: 1,
514
+            calcium: 1,
515
+            bicarbonate: 1
516
+          },
517
+          {
518
+            id: 13,
519
+            name: 'CRRT',
520
+            dialysis_duration: 1,
521
+            replacement_way: 1,
522
+            hemodialysis_machine: 2,
523
+            blood_filter: 1,
524
+            perfusion_apparatus: 2,
525
+            blood_flow_volume: 1,
526
+            dialysate_flow: 2,
527
+            kalium: 1,
528
+            sodium: 1,
529
+            calcium: 1,
530
+            bicarbonate: 1
531
+          },
532
+          {
533
+            id: 14,
534
+            name: '腹水回输',
535
+            dialysis_duration: 1,
536
+            replacement_way: 2,
537
+            hemodialysis_machine: 1,
538
+            blood_filter: 2,
539
+            perfusion_apparatus: 2,
540
+            blood_flow_volume: 2,
541
+            dialysate_flow: 2,
542
+            kalium: 2,
543
+            sodium: 2,
544
+            calcium: 2,
545
+            bicarbonate: 2
546
+          },
547
+          {
548
+            id: 15,
549
+            name: 'HD前置换',
550
+            dialysis_duration: 1,
551
+            replacement_way: 2,
552
+            hemodialysis_machine: 1,
553
+            blood_filter: 2,
554
+            perfusion_apparatus: 2,
555
+            blood_flow_volume: 1,
556
+            dialysate_flow: 1,
557
+            kalium: 1,
558
+            sodium: 1,
559
+            calcium: 1,
560
+            bicarbonate: 1
561
+          },
562
+          {
563
+            id: 16,
564
+            name: 'HD后置换',
565
+            dialysis_duration: 1,
566
+            replacement_way: 2,
567
+            hemodialysis_machine: 1,
568
+            blood_filter: 2,
569
+            perfusion_apparatus: 2,
570
+            blood_flow_volume: 1,
571
+            dialysate_flow: 1,
572
+            kalium: 1,
573
+            sodium: 1,
574
+            calcium: 1,
575
+            bicarbonate: 1
576
+          },
577
+          {
578
+            id: 17,
579
+            name: 'HDF前置换',
580
+            dialysis_duration: 1,
581
+            replacement_way: 1,
582
+            hemodialysis_machine: 2,
583
+            blood_filter: 1,
584
+            perfusion_apparatus: 2,
585
+            blood_flow_volume: 1,
586
+            dialysate_flow: 1,
587
+            kalium: 1,
588
+            sodium: 1,
589
+            calcium: 1,
590
+            bicarbonate: 1
591
+          },
592
+          {
593
+            id: 18,
594
+            name: 'HDF后置换',
595
+            dialysis_duration: 1,
596
+            replacement_way: 1,
597
+            hemodialysis_machine: 2,
598
+            blood_filter: 1,
599
+            perfusion_apparatus: 2,
600
+            blood_flow_volume: 1,
601
+            dialysate_flow: 1,
602
+            kalium: 1,
603
+            sodium: 1,
604
+            calcium: 1,
605
+            bicarbonate: 1
606
+          }
607
+
608
+        ],
609
+        addPlan: {
610
+          id: 0,
611
+          mode:'',
612
+          dialyzer: '',
613
+          dialysis_duration: '',
614
+          dialysis_duration_hour: '',
615
+          dialysis_duration_minute: '',
616
+          hemodialysis_machine: '',
617
+          perfusion_apparatus: '',
618
+          dialysate_formulation:'',
619
+          blood_flow_volume: '',
620
+          dewater: '',
621
+          displace_liqui: 0,
622
+          replacement_way: '',
623
+          anticoagulant: '',
624
+          anticoagulant_shouji: '',
625
+          anticoagulant_weichi: '',
626
+          anticoagulant_zongliang: '',
627
+          anticoagulant_gaimingcheng: '',
628
+          anticoagulant_gaijiliang: '',
629
+          kalium: '',
630
+          replacement_total: '',
631
+          sodium: '',
632
+          calcium: '',
633
+          bicarbonate: '',
634
+          glucose: '',
635
+          dry_weight: '',
636
+          dialysate_flow: '',
637
+          dialysate_temperature: '',
638
+          conductivity: '',
639
+          doctor: '',
640
+          remark: '',
641
+          target_ktv: '',
642
+          target_ultrafiltration: '',
643
+          dialyzer_perfusion_apparatus: '',
644
+          body_fluid: '',
645
+          body_fluid_other: '',
646
+          special_medicine: '',
647
+          special_medicine_other: '',
648
+          displace_liqui_part: '',
649
+          displace_liqui_value: '',
650
+          ultrafiltration: '',
651
+          blood_access: ''
652
+        },
653
+        system_prescription: [],
654
+        isEdit: false,
655
+        anticoagulant: {
656
+          id: 0,
657
+          name: '',
658
+          type: 1,
659
+          shouji: 1,
660
+          weichi: 1,
661
+          zongliang: 1,
662
+          gaimingcheng: -1,
663
+          gaijiliang: -1,
664
+          shouji_unit: 'mg',
665
+          weichi_unit: 'mg/h',
666
+          zongliang_unit: 'mg',
667
+          gaimingcheng_unit: '',
668
+          gaijiliang_unit: ''
669
+        },
670
+        anticoagulantsSet: {
671
+          type: 1
672
+        },
673
+        replacementWays: null,
674
+        anticoagulantsConfit: null,
675
+        dialysate_formulation: [],
676
+        body_fluid_option: [],
677
+        special_medicine_option: [],
678
+        displace_liqui_part_option: [],
679
+        blood_access_option: []
680
+
681
+      }
682
+    },
683
+    computed: {},
684
+    methods: {
685
+      openEdit() {
686
+
687
+      },
688
+      tableRows({ row, rowIndex }) {
689
+        // 把每一行的索引放进row
690
+        row.index = rowIndex
691
+      },
692
+      onRowClicks(row, event, column) {
693
+        this.current_select = row.id
694
+        this.mode_name = row.name
695
+        this.isEdit = false
696
+        this.addPlan.mode = row.id
697
+        this.getSystemPrescription(row.id)
698
+
699
+      },getSystemPrescription(id){
700
+
701
+
702
+       var tempAddPlan = {
703
+          id: 0,
704
+            mode:'',
705
+            dialyzer: '',
706
+            dialysis_duration: '',
707
+            dialysis_duration_hour: '',
708
+            dialysis_duration_minute: '',
709
+            hemodialysis_machine: '',
710
+            dialysate_formulation:'',
711
+            perfusion_apparatus: '',
712
+            blood_flow_volume: '',
713
+            dewater: '',
714
+            displace_liqui: 0,
715
+            replacement_way: '',
716
+            anticoagulant: '',
717
+            anticoagulant_shouji: '',
718
+            anticoagulant_weichi: '',
719
+            anticoagulant_zongliang: '',
720
+            anticoagulant_gaimingcheng: '',
721
+            anticoagulant_gaijiliang: '',
722
+            kalium: '',
723
+            replacement_total: '',
724
+            sodium: '',
725
+            calcium: '',
726
+            bicarbonate: '',
727
+            glucose: '',
728
+            dry_weight: '',
729
+            dialysate_flow: '',
730
+            dialysate_temperature: '',
731
+            conductivity: '',
732
+            doctor: '',
733
+            remark: '',
734
+            target_ktv: '',
735
+            target_ultrafiltration: '',
736
+            dialyzer_perfusion_apparatus: '',
737
+            body_fluid: '',
738
+            body_fluid_other: '',
739
+            special_medicine: '',
740
+            special_medicine_other: '',
741
+            displace_liqui_part: '',
742
+            displace_liqui_value: '',
743
+            ultrafiltration: '',
744
+            blood_access: ''
745
+        }
746
+
747
+        for (const key in  tempAddPlan) {
748
+          this.addPlan[key] = tempAddPlan[key]
749
+        }
750
+        this.isEdit = false
751
+        let params ={
752
+          id:id
753
+        }
754
+
755
+        this.dialysisTimeShow = new Date(2018, 1, 1, this.addPlan.dialysis_duration_hour, this.addPlan.dialysis_duration_minute)
756
+
757
+
758
+        getSystemPrescription(params).then(response => {
759
+          if (response.data.state == 0) {
760
+            this.$message.error(response.data.msg)
761
+            return false
762
+          } else {
763
+            if(response.data.data.prescription.id > 0) {
764
+              for (const key in  response.data.data.prescription) {
765
+                this.addPlan[key] = response.data.data.prescription[key]
766
+              }
767
+
768
+              this.dialysisTimeShow = new Date(2018, 1, 1, this.addPlan.dialysis_duration_hour, this.addPlan.dialysis_duration_minute)
769
+              if (this.addPlan.id > 0) {
770
+                this.isEdit = true
771
+              }
772
+            }
773
+            this.addPlan.mode = id
774
+          }
775
+        })
776
+      },
777
+      getModeStatus: function(id) {
778
+        for (let i = 0; i < this.system_prescription.length; i++) {
779
+          if (this.system_prescription[i].mode_id == id) {
780
+            return '已保存'
781
+          }
782
+        }
783
+        return '未保存'
784
+      }, getAllSystemPrescription() {
785
+        getAllSystemPrescription().then(response => {
786
+          if (response.data.state == 0) {
787
+            this.$message.error(response.data.msg)
788
+            return false
789
+          } else {
790
+            this.system_prescription = response.data.data.prescriptions
791
+            for (let i = 0; i < this.system_prescription.length; i++) {
792
+              if (this.system_prescription[i].mode == 1) {
793
+                this.isEdit = true
794
+              }
795
+            }
796
+
797
+          }
798
+        })
799
+
800
+      }, selectnDialysisTime(val) {
801
+        var valTime = val.split(':')
802
+        this.addPlan.dialysis_duration = parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2))
803
+        this.addPlan.dialysis_duration_hour = valTime[0]
804
+        this.addPlan.dialysis_duration_minute = valTime[1]
805
+      }, changeThisAnticoagulant() {
806
+        var thismode = parseInt(this.addPlan.anticoagulant)
807
+        if (isNaN(thismode) || thismode <= 0) {
808
+          return false
809
+        }
810
+        if (typeof (this.anticoagulantsConfit[thismode]) == 'undefined' || this.anticoagulantsConfit[thismode] == null) {
811
+          return false
812
+        }
813
+        this.anticoagulant = this.anticoagulantsConfit[thismode]
814
+      }, savePrescription:function() {
815
+        this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
816
+        if (!this.isEdit){
817
+          postSystemPrescription(this.addPlan).then(response => {
818
+            if (response.data.state == 0) {
819
+              this.$message.error(response.data.msg)
820
+              return false
821
+            } else {
822
+              this.$notify({
823
+                title: '成功',
824
+                message: '创建成功',
825
+                type: 'success',
826
+                duration: 2000
827
+              })
828
+              this.isEdit = true
829
+              this.system_prescription = []
830
+              this.system_prescription = response.data.data.prescriptions
831
+              this.addPlan.id  =  response.data.data.prescription.id
832
+              return false
833
+            }
834
+          })
835
+        }else{
836
+          updateSystemPrescription(this.addPlan.id, this.addPlan).then(response => {
837
+            if (response.data.state == 0) {
838
+              this.$message.error(response.data.msg)
839
+              return false
840
+            } else {
841
+              this.isEdit = true
842
+              this.addPlan.id  =  response.data.data.prescription.id
843
+              this.$notify({
844
+                title: '成功',
845
+                message: '编辑成功',
846
+                type: 'success',
847
+                duration: 2000
848
+              })
849
+              return false
850
+            }
851
+          })
852
+        }
853
+      }
854
+
855
+    }, mounted() {
856
+      this.$refs.singleTable.setCurrentRow(this.treatment_mode[0])
857
+      this.mode_name = this.treatment_mode[0].name
858
+      this.current_select = this.treatment_mode[0].id
859
+    },
860
+    created() {
861
+      this.anticoagulantsSet = this.$store.getters.anticoagulants_set
862
+      this.replacementWays = this.$store.getters.replacement_ways
863
+      this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
864
+      this.blood_filters = this.$store.getters.blood_filters
865
+      this.dialysate_formulation = this.$store.getters.dialysate_formulation
866
+      this.body_fluid_option = this.$store.getters.body_fluid
867
+      this.special_medicine_option = this.$store.getters.special_medicine
868
+      this.displace_liqui_part_option = this.$store.getters.displace_liqui
869
+      this.blood_access_option = this.$store.getters.blood_access
870
+      this.addPlan.mode = 1
871
+      this.getAllSystemPrescription()
872
+      this.getSystemPrescription(this.addPlan.mode)
873
+
874
+    }, watch: {
875
+      'addPlan.dialysis_duration': function() {
876
+        this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
877
+          this.addPlan.anticoagulant_shouji,
878
+          this.addPlan.dialysis_duration,
879
+          this.addPlan.anticoagulant_weichi
880
+        )
881
+      },
882
+      'addPlan.anticoagulant_shouji': function() {
883
+        this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
884
+          this.addPlan.anticoagulant_shouji,
885
+          this.addPlan.dialysis_duration,
886
+          this.addPlan.anticoagulant_weichi
887
+        )
888
+      },
889
+      'addPlan.anticoagulant_weichi': function() {
890
+        this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
891
+          this.addPlan.anticoagulant_shouji,
892
+          this.addPlan.dialysis_duration,
893
+          this.addPlan.anticoagulant_weichi
894
+        )
895
+      }
896
+    }
897
+  }
898
+</script>
899
+
900
+<style rel="stylesheet/scss" lang="scss" scoped>
901
+</style>

+ 11 - 8
src/xt_pages/dialysis/details/NavIgation.vue Zobrazit soubor

@@ -253,7 +253,14 @@ export default {
253 253
       default: () => {
254 254
         return { id: 0 };
255 255
       }
256
+    },  system_prescribe: {
257
+      // 系统透析方案
258
+      type: Object,
259
+      default: () => {
260
+        return { id: 0 };
261
+      }
256 262
     },
263
+
257 264
     receiver_treatment_access: {
258 265
       // 接诊评估
259 266
       type: Object,
@@ -528,14 +535,9 @@ export default {
528 535
       lastAssessmentAfterDislysis,
529 536
       lastDialysisPrescribe,
530 537
       lastDryWeightDislysis,
531
-      schedual
538
+      schedual,
539
+      system_prescribe
532 540
     ) {
533
-      console.log(lastPredialysisEvaluation);
534
-      console.log(lastMonitorRecord);
535
-      console.log(lastAssessmentAfterDislysis);
536
-      console.log(lastDialysisPrescribe);
537
-      console.log(lastDryWeightDislysis);
538
-      console.log(schedual);
539 541
 
540 542
       this.$refs.assessmentBefore.setLastRecord(
541 543
         lastPredialysisEvaluation,
@@ -546,7 +548,8 @@ export default {
546 548
         lastAssessmentAfterDislysis,
547 549
         lastPredialysisEvaluation,
548 550
         lastDialysisPrescribe,
549
-        lastDryWeightDislysis
551
+        lastDryWeightDislysis,
552
+        system_prescribe
550 553
       );
551 554
 
552 555
       // this.temp_schedual = schedual

+ 20 - 4
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Zobrazit soubor

@@ -909,7 +909,7 @@
909 909
           return true
910 910
         }
911 911
       },
912
-      setLastRecord: function(schedual, lastAssessmentAfterDislysis, lastPredialysisEvaluation, lastDialysisPrescribe, lastDryWeightDislysis) {
912
+      setLastRecord: function(schedual, lastAssessmentAfterDislysis, lastPredialysisEvaluation, lastDialysisPrescribe, lastDryWeightDislysis,system_prescribe) {
913 913
         this.treatment_mode = this.$store.getters.treatment_mode
914 914
         this.perfusion_apparatus = getDataConfig('hemodialysis', 'perfusion_apparatus')
915 915
         this.replacement_ways = getDataConfig('hemodialysis', 'replacement_ways')
@@ -931,17 +931,27 @@
931 931
           }
932 932
         } else if (this.solution != null && typeof this.solution.id !== 'undefined' && this.solution.id > 0) {
933 933
           for (const key in this.solution) {
934
-            this.dialysisPrescription[key] = this.solution[key]
934
+            if (key != 'target_ultrafiltration') {
935
+              this.dialysisPrescription[key] = this.solution[key]
936
+            }
935 937
           }
936 938
         } else if (lastDialysisPrescribe != null && typeof lastDialysisPrescribe.id !== 'undefined' && lastDialysisPrescribe.id > 0) {
937 939
           for (const key in lastDialysisPrescribe) {
938
-            this.dialysisPrescription[key] = lastDialysisPrescribe[key]
940
+            if (key != 'target_ultrafiltration') {
941
+
942
+              this.dialysisPrescription[key] = lastDialysisPrescribe[key]
943
+            }
944
+          }
945
+        } else if (system_prescribe != null && typeof system_prescribe.id !== 'undefined' && system_prescribe.id > 0) {
946
+          for (const key in system_prescribe) {
947
+            if (key != 'target_ultrafiltration') {
948
+              this.dialysisPrescription[key] = system_prescribe[key]
949
+            }
939 950
           }
940 951
         } else {
941 952
           this.dialysisPrescription.mode_id = schedual.mode_id
942 953
         }
943 954
 
944
-        console.log(this.dialysisPrescription.anticoagulant)
945 955
 
946 956
         var thismode = parseInt(this.dialysisPrescription.anticoagulant)
947 957
         if (isNaN(thismode) || thismode <= 0) {
@@ -2055,6 +2065,12 @@
2055 2065
                     this.dialysisPrescription[key] = response.data.data.prescription[key]
2056 2066
                   }
2057 2067
                 }
2068
+              } else if (response.data.data.system_prescription != null) { // 临时处方不为空
2069
+                for (const key in response.data.data.system_prescription) {
2070
+                  if (key != 'target_ultrafiltration') {
2071
+                    this.dialysisPrescription[key] = response.data.data.system_prescription[key]
2072
+                  }
2073
+                }
2058 2074
               } else {
2059 2075
                 for (const key in this.dialysisPrescription) { // 临时处方为空
2060 2076
                   if (key != 'target_ultrafiltration') {

+ 7 - 3
src/xt_pages/dialysis/details/index.vue Zobrazit soubor

@@ -59,7 +59,7 @@
59 59
         :last_dryWeight_dislysis = "lastDryWeightDislysis"
60 60
         :special_premission = "headNurses"
61 61
         @assessmentAfterDislysis="assessmentAfterDislysisFunc"
62
-
62
+        :system_prescribe = "system_prescribe"
63 63
 
64 64
 
65 65
       >
@@ -314,6 +314,7 @@
314 314
         schedual: { id: 0 }, // 患者排班信息
315 315
         prescription: { id: 0 }, // 透析处方
316 316
         solution: { id: 0 }, // 透析方案
317
+        system_prescribe:{id:0},
317 318
         receiver_treatment_access: { id: 0 }, // 接诊评估
318 319
         predialysis_evaluation: { id: 0 }, // 透前评估
319 320
         doctor_advices: [], // 临时医嘱
@@ -505,7 +506,10 @@
505 506
             var lastDryWeightDislysis = resp.data.lastDryWeightDislysis
506 507
 
507 508
 
508
-            this.$refs.nav.setLastRecord(lastPredialysisEvaluation,lastMonitorRecord,lastAssessmentAfterDislysis,lastDialysisPrescribe,lastDryWeightDislysis,schedual)
509
+            var system_prescribe = resp.data.system_prescribe
510
+
511
+
512
+            this.$refs.nav.setLastRecord(lastPredialysisEvaluation,lastMonitorRecord,lastAssessmentAfterDislysis,lastDialysisPrescribe,lastDryWeightDislysis,schedual,system_prescribe)
509 513
 
510 514
 
511 515
 
@@ -520,7 +524,7 @@
520 524
             this.lastDialysisPrescribe = lastDialysisPrescribe
521 525
             this.lastDryWeightDislysis = lastDryWeightDislysis
522 526
             this.headNurses = headNurses
523
-
527
+            this.system_prescribe =  system_prescribe
524 528
 
525 529
 
526 530
 

+ 3 - 3
src/xt_pages/user/components/PatientSidebar.vue Zobrazit soubor

@@ -27,9 +27,9 @@
27 27
       <el-tree
28 28
         :data="treeData"
29 29
         accordion
30
-        node-key="name" 
31
-        :key="treeKey" 
32
-        :current-node-key="treeKey" 
30
+        node-key="name"
31
+        :key="treeKey"
32
+        :current-node-key="treeKey"
33 33
         :default-expanded-keys="[defaultActive]"
34 34
         @node-click="handleNodeClick"
35 35
         >

+ 87 - 0
src/xt_pages/user/dialysisSolution.vue Zobrazit soubor

@@ -453,6 +453,14 @@
453 453
     editPatientDialysisSolution,
454 454
     fetchPatientDialysisSolutions
455 455
   } from '@/api/patient'
456
+
457
+  import {
458
+    getSystemPrescription,
459
+  } from '@/api/config'
460
+
461
+
462
+
463
+
456 464
   import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
457 465
   import store from '@/store'
458 466
 
@@ -1198,6 +1206,85 @@
1198 1206
         }
1199 1207
         // this.current_model = this.modeOptions[thismode];
1200 1208
         this.addPlan.mode_name = this.modeOptions[thismode].name
1209
+        let params = {
1210
+          id: thismode
1211
+        }
1212
+
1213
+
1214
+
1215
+        getSystemPrescription(params).then(response => {
1216
+          if (response.data.state == 1) {
1217
+            if(response.data.data.prescription.id > 0) {
1218
+              for (const key in  response.data.data.prescription) {
1219
+                //因为el-input特性整数类型或者浮点数类型需要转换成字符串,所以加上toString()
1220
+                this.$set(this.addPlan, key, response.data.data.prescription[key].toString())
1221
+              }
1222
+
1223
+              //因为el-select特性,整数类型不能转字符串,所以额外处理这些数据
1224
+              this.$set(this.addPlan, "dialysate_formulation", response.data.data.prescription['dialysate_formulation'])
1225
+              this.$set(this.addPlan, "anticoagulant", response.data.data.prescription['anticoagulant'])
1226
+              this.$set(this.addPlan, "body_fluid", response.data.data.prescription['body_fluid'])
1227
+              this.$set(this.addPlan, "special_medicine", response.data.data.prescription['special_medicine'])
1228
+              this.$set(this.addPlan, "displace_liqui_part", response.data.data.prescription['displace_liqui_part'])
1229
+              this.$set(this.addPlan, "blood_access", response.data.data.prescription['blood_access'])
1230
+
1231
+
1232
+
1233
+              this.dialysisTimeShow = new Date(2018, 1, 1, this.addPlan.dialysis_duration_hour, this.addPlan.dialysis_duration_minute)
1234
+
1235
+            }else{
1236
+              var tempAddPlan = {
1237
+                id: 0,
1238
+                dialyzer: '',
1239
+                dialysis_duration: '',
1240
+                dialysis_duration_hour: '',
1241
+                dialysis_duration_minute: '',
1242
+                hemodialysis_machine: '',
1243
+                dialysate_formulation:'',
1244
+                perfusion_apparatus: '',
1245
+                blood_flow_volume: '',
1246
+                dewater: '',
1247
+                displace_liqui: 0,
1248
+                replacement_way: '',
1249
+                anticoagulant: '',
1250
+                anticoagulant_shouji: '',
1251
+                anticoagulant_weichi: '',
1252
+                anticoagulant_zongliang: '',
1253
+                anticoagulant_gaimingcheng: '',
1254
+                anticoagulant_gaijiliang: '',
1255
+                kalium: '',
1256
+                replacement_total: '',
1257
+                sodium: '',
1258
+                calcium: '',
1259
+                bicarbonate: '',
1260
+                glucose: '',
1261
+                dry_weight: '',
1262
+                dialysate_flow: '',
1263
+                dialysate_temperature: '',
1264
+                conductivity: '',
1265
+                doctor: '',
1266
+                remark: '',
1267
+                target_ktv: '',
1268
+                target_ultrafiltration: '',
1269
+                dialyzer_perfusion_apparatus: '',
1270
+                body_fluid: '',
1271
+                body_fluid_other: '',
1272
+                special_medicine: '',
1273
+                special_medicine_other: '',
1274
+                displace_liqui_part: '',
1275
+                displace_liqui_value: '',
1276
+                ultrafiltration: '',
1277
+                blood_access: ''
1278
+              }
1279
+
1280
+              for (const key in  tempAddPlan) {
1281
+                this.addPlan[key] = tempAddPlan[key]
1282
+              }
1283
+
1284
+
1285
+            }
1286
+          }
1287
+        })
1201 1288
       },
1202 1289
       setCurrentMode(id) {
1203 1290
         if (typeof (this.modeOptions[id]) == 'undefined' || this.modeOptions[id] == null) {

+ 2 - 2
src/xt_pages/user/inspection.vue Zobrazit soubor

@@ -106,8 +106,8 @@
106 106
 
107 107
       <el-form :model="form"  ref="form" label-position="top">
108 108
 
109
-        <el-row v-if="form.formItem[0].project_id == 14">
110
-          <el-col :span="24">
109
+        <el-row >
110
+          <el-col :span="24" v-if="form.formItem[0].project_id == 14">
111 111
             <el-form-item label="传染病周期提醒: " >
112 112
               <el-radio-group v-model="form.remind_cycle">
113 113
                 <el-radio :label="1">一月一次</el-radio>