|
@@ -0,0 +1,616 @@
|
|
1
|
+<template>
|
|
2
|
+
|
|
3
|
+ <div class="main-contain">
|
|
4
|
+ <div class="position">
|
|
5
|
+ <bread-crumb :crumbs='crumbs'></bread-crumb>
|
|
6
|
+ </div>
|
|
7
|
+ <div class="app-container sign-and-weigh-box">
|
|
8
|
+ <el-row :gutter="24">
|
|
9
|
+ <el-col :span="8">
|
|
10
|
+ <div class="dataTitle">患者列表</div>
|
|
11
|
+ <div style="margin-bottom: 10px;">
|
|
12
|
+ <el-input v-model="queryParams.keywords" placeholder="姓名/透析号" style="width: 180px;" @change="changeSearch"></el-input>
|
|
13
|
+ <el-button type="primary" @change="changeSearch">搜索</el-button>
|
|
14
|
+ <el-select v-model="queryParams.schedule_type" style="width: 100px;" @change="changeSearch">
|
|
15
|
+ <el-option v-for="item in shiftOptions" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
|
16
|
+ </el-select>
|
|
17
|
+ </div>
|
|
18
|
+
|
|
19
|
+ <el-table :data="patients" :class="signAndWeighBoxPatients" style="width: 100%" border highlight-current-row :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" max-height="300" @current-change="handleCurrentChange">
|
|
20
|
+ <el-table-column type="index" label="序号" width="50px" align="center"></el-table-column>
|
|
21
|
+ <el-table-column prop="name" label="姓名" min-width="20" align="center">
|
|
22
|
+ <template slot-scope="scope">
|
|
23
|
+ {{scope.row.name}}({{scope.row.dialysis_no}})
|
|
24
|
+ </template>
|
|
25
|
+ </el-table-column>
|
|
26
|
+
|
|
27
|
+ <el-table-column prop="state" label="状态" min-width="30" align="center">
|
|
28
|
+ <template slot-scope="scope">
|
|
29
|
+ <span v-if="scope.row.signin.id ==0">未签到</span>
|
|
30
|
+ <span v-else-if="scope.row.dialysis_order.stage==2">已经下机</span>
|
|
31
|
+ <span v-else>已签到</span>
|
|
32
|
+ </template>
|
|
33
|
+ </el-table-column>
|
|
34
|
+ </el-table>
|
|
35
|
+
|
|
36
|
+ <el-table :data="schedules" :class="signAndWeighBoxPatients" style="width: 100%; margin:15px 0 0 0;" border highlight-current-row :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}">
|
|
37
|
+ <el-table-column prop="shift" label="班次" min-width="30" align="center"></el-table-column>
|
|
38
|
+ <el-table-column prop="arrange" label="排班" min-width="30" align="center" ></el-table-column>
|
|
39
|
+ <el-table-column prop="sign" label="签到" min-width="30" align="center" ></el-table-column>
|
|
40
|
+ <el-table-column prop="weight" label="称重(透前/透后)" min-width="50" align="center">
|
|
41
|
+ <template slot-scope="scope">
|
|
42
|
+ {{scope.row.before}} / {{scope.row.after}}
|
|
43
|
+ </template>
|
|
44
|
+ </el-table-column>
|
|
45
|
+ </el-table>
|
|
46
|
+ </el-col>
|
|
47
|
+
|
|
48
|
+ <el-col :span="16">
|
|
49
|
+ <div class="dataTitle">患者信息</div>
|
|
50
|
+ <el-form class="information" label-position="left">
|
|
51
|
+ <div class="inforTitle">
|
|
52
|
+ <el-button @click="change()" style="float:right;">修改</el-button>
|
|
53
|
+ <span class="name">姓名:{{weigh_form.name}} 透析号:{{weigh_form.dialysis_no}} </span>
|
|
54
|
+ </div>
|
|
55
|
+ <div class="border"></div>
|
|
56
|
+ <div style="margin-bottom:20px;color:rgb(96,96,96);font-size:14px">
|
|
57
|
+ 透前体重(kg): <el-input v-model="weigh_list.weight_before" :disabled="disa" style="width:200px"></el-input>
|
|
58
|
+ 干体重(kg): <el-input v-model="weigh_list.dry_weight" :disabled="disa" style="width:200px"></el-input><br>
|
|
59
|
+ </div>
|
|
60
|
+ <div style="margin-bottom:12px;color:rgb(96,96,96);font-size:14px">
|
|
61
|
+ 体温(℃): <el-input v-model="weigh_list.temperature" :disabled="disa" style="width:70px"></el-input>
|
|
62
|
+ 脉搏(次/分): <el-input v-model="weigh_list.pulse_frequency" :disabled="disa" style="width:70px"></el-input>
|
|
63
|
+ 呼吸(次/分): <el-input v-model="weigh_list.breathing_rate" :disabled="disa" style="width:70px"></el-input>
|
|
64
|
+ 血压(mmHg): <el-input v-model="weigh_list.systolic_blood_pressure" style="width: 70px" :disabled="disa"></el-input><span> / </span> <el-input v-model="weigh_list.diastolic_blood_pressure" style="width: 70px" :disabled="disa"></el-input>
|
|
65
|
+ </div>
|
|
66
|
+ <div class="border"></div>
|
|
67
|
+ <div style="margin-bottom:20px;color:rgb(96,96,96);font-size:14px">
|
|
68
|
+ 透后称重(kg): <el-input v-model="weigh_infor.weight_after" style="width:200px" :disabled="disa"></el-input>
|
|
69
|
+ 干体重(kg): <el-input v-model="weigh_list.dry_weight" :disabled="disa" style="width:200px"></el-input>
|
|
70
|
+ </div>
|
|
71
|
+ <div style="margin-bottom:12px;color:rgb(96,96,96);font-size:14px">
|
|
72
|
+ 体温(℃): <el-input v-model="weigh_infor.temperature" :disabled="disa" style="width:70px"></el-input>
|
|
73
|
+ 脉搏(次/分): <el-input v-model="weigh_infor.pulse_frequency" :disabled="disa" style="width:70px"></el-input>
|
|
74
|
+ 呼吸(次/分): <el-input v-model="weigh_infor.breathing_rate" :disabled="disa" style="width:70px"></el-input>
|
|
75
|
+ 血压(mmHg): <el-input v-model="weigh_infor.systolic_blood_pressure" style="width: 70px" :disabled="disa"></el-input> <span> / </span><el-input v-model="weigh_infor.diastolic_blood_pressure" style="width: 70px" :disabled="disa"></el-input>
|
|
76
|
+ </div>
|
|
77
|
+
|
|
78
|
+ <div class="border"></div>
|
|
79
|
+ <div v-if="show">
|
|
80
|
+ <el-row :gutter="20">
|
|
81
|
+ <el-col :span="23" align="right" class="button">
|
|
82
|
+ <el-button @click="hide()">取消</el-button>
|
|
83
|
+ <el-button @click="savedata();updatedata();sighdata();" type="primary">保存</el-button>
|
|
84
|
+ </el-col>
|
|
85
|
+ </el-row>
|
|
86
|
+ </div>
|
|
87
|
+ </el-form>
|
|
88
|
+ </el-col>
|
|
89
|
+ </el-row>
|
|
90
|
+ </div>
|
|
91
|
+ </div>
|
|
92
|
+</template>
|
|
93
|
+
|
|
94
|
+<script>
|
|
95
|
+import { fetchSignPatients, getPatientSign, SignWeigh, getDialysisInforInfomation, getDialysisAfterInfomation, createdata, editdata, sighdata } from '@/api/signandweigh'
|
|
96
|
+import BreadCrumb from '../components/bread-crumb'
|
|
97
|
+export default {
|
|
98
|
+ name: 'sign',
|
|
99
|
+ components: { BreadCrumb },
|
|
100
|
+ data() {
|
|
101
|
+ return {
|
|
102
|
+ crumbs: [
|
|
103
|
+ { path: '/sign/index', name: '签到称重' }
|
|
104
|
+ ],
|
|
105
|
+ patientlist: [],
|
|
106
|
+ signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
|
|
107
|
+ queryParams: {
|
|
108
|
+ keywords: '',
|
|
109
|
+ schedule_type: '',
|
|
110
|
+ need_schedule_type: 0
|
|
111
|
+ },
|
|
112
|
+ querySignParams: {
|
|
113
|
+ patient_id: 0,
|
|
114
|
+ date_time: ''
|
|
115
|
+ },
|
|
116
|
+ weigh_form: {
|
|
117
|
+ choose: false,
|
|
118
|
+ name: '',
|
|
119
|
+ dry_weight: '',
|
|
120
|
+ clothes_weight: '',
|
|
121
|
+ // 透前
|
|
122
|
+ weigh_before: '',
|
|
123
|
+ dehydrated_weight: '',
|
|
124
|
+ dehydrated_percent: '',
|
|
125
|
+ weight_before: '',
|
|
126
|
+ temperature_before: '',
|
|
127
|
+ pulse_rate_before: '', // P 脉率
|
|
128
|
+ respiratory_rate_before: '', // R 呼吸频率
|
|
129
|
+ DBP_before: '', // 舒张压
|
|
130
|
+ SBP_before: '', // 收缩压
|
|
131
|
+ // 透后
|
|
132
|
+ weigh_after: '',
|
|
133
|
+ weight_reduce_after: '',
|
|
134
|
+ weight_after: '',
|
|
135
|
+ temperature_after: '',
|
|
136
|
+ pulse_rate_after: '', // P 脉率
|
|
137
|
+ respiratory_rate_after: '', // R 呼吸频率
|
|
138
|
+ DBP_after: '', // 舒张压
|
|
139
|
+ SBP_after: '', // 收缩压
|
|
140
|
+ dialysis_no: ''
|
|
141
|
+
|
|
142
|
+ },
|
|
143
|
+ weigh_list: {
|
|
144
|
+ weight_before: '', // 透前体重
|
|
145
|
+ temperature: '', // 体温
|
|
146
|
+ pulse_frequency: '', // 脉搏
|
|
147
|
+ breathing_rate: '', // 呼吸频率
|
|
148
|
+ dry_weight: '', // 干体重
|
|
149
|
+ systolic_blood_pressure: '', // 收缩压
|
|
150
|
+ diastolic_blood_pressure: ''// 舒张压
|
|
151
|
+ },
|
|
152
|
+ weigh_infor: {
|
|
153
|
+ weight_after: '', // 透后体重
|
|
154
|
+ temperature: '',
|
|
155
|
+ pulse_frequency: '',
|
|
156
|
+ breathing_rate: '',
|
|
157
|
+ dry_weight: '',
|
|
158
|
+ systolic_blood_pressure: '',
|
|
159
|
+ diastolic_blood_pressure: ''
|
|
160
|
+ },
|
|
161
|
+ shiftOptions: [
|
|
162
|
+ { value: 0, label: '全部' },
|
|
163
|
+ { value: 1, label: '上午' },
|
|
164
|
+ { value: 2, label: '下午' },
|
|
165
|
+ { value: 3, label: '晚上' }
|
|
166
|
+ ],
|
|
167
|
+ schedules: [{
|
|
168
|
+ type: 1,
|
|
169
|
+ shift: '上午',
|
|
170
|
+ arrange: 0,
|
|
171
|
+ sign: 0,
|
|
172
|
+ before: 0,
|
|
173
|
+ after: 0
|
|
174
|
+ }, {
|
|
175
|
+ type: 2,
|
|
176
|
+ shift: '下午',
|
|
177
|
+ arrange: 0,
|
|
178
|
+ sign: 0,
|
|
179
|
+ before: 0,
|
|
180
|
+ after: 0
|
|
181
|
+ }, {
|
|
182
|
+ type: 3,
|
|
183
|
+ shift: '晚上',
|
|
184
|
+ arrange: 0,
|
|
185
|
+ sign: 0,
|
|
186
|
+ before: 0,
|
|
187
|
+ after: 0
|
|
188
|
+ }],
|
|
189
|
+ patients: [],
|
|
190
|
+ dialysis_stege: 0,
|
|
191
|
+ show: false,
|
|
192
|
+ disa: true
|
|
193
|
+ }
|
|
194
|
+ },
|
|
195
|
+ methods: {
|
|
196
|
+ fetchSignPatients() {
|
|
197
|
+ fetchSignPatients(this.queryParams).then(response => {
|
|
198
|
+ this.patients = []
|
|
199
|
+ if (response.data.state === 1) {
|
|
200
|
+ this.patients = response.data.data.patients
|
|
201
|
+ console.log('病人信息', this.patients[0].schedule)
|
|
202
|
+ // 将没有排班的信息排除
|
|
203
|
+ for (let i = this.patients.length - 1; i >= 0; i--) {
|
|
204
|
+ if (this.patients[i].schedule.id == 0) {
|
|
205
|
+ this.patients.splice(i, 1)
|
|
206
|
+ }
|
|
207
|
+ }
|
|
208
|
+ this.queryParams.schedule_type = response.data.data.schedule_type
|
|
209
|
+ this.querySignParams.date_time = response.data.data.today
|
|
210
|
+
|
|
211
|
+ if (this.queryParams.need_schedule_type === 1) {
|
|
212
|
+ var sl = this.schedules.length
|
|
213
|
+ console.log('s1是什么东西')
|
|
214
|
+ console.log(sl)
|
|
215
|
+ for (let index = 0; index < sl; index++) {
|
|
216
|
+ if (this.schedules[index].type in response.data.data.panel) {
|
|
217
|
+ console.log(this.schedules[index].type)
|
|
218
|
+ console.log(response.data.data.panel[this.schedules[index].type].schedule)
|
|
219
|
+ this.schedules[index].arrange = response.data.data.panel[this.schedules[index].type].schedule
|
|
220
|
+ this.schedules[index].sign = response.data.data.panel[this.schedules[index].type].sign
|
|
221
|
+ this.schedules[index].before = response.data.data.panel[this.schedules[index].type].before
|
|
222
|
+ this.schedules[index].after = response.data.data.panel[this.schedules[index].type].after
|
|
223
|
+ }
|
|
224
|
+ }
|
|
225
|
+ }
|
|
226
|
+ }
|
|
227
|
+ })
|
|
228
|
+ },
|
|
229
|
+ // getPatientSign(){
|
|
230
|
+ // getPatientSign(this.querySignParams).then(response=>{
|
|
231
|
+ // if (response.data.state==1) {
|
|
232
|
+ // if (response.data.data.sign != null) {
|
|
233
|
+ // var sign = response.data.data.sign;
|
|
234
|
+ // this.weigh_form.dry_weight = sign.dry_weight;
|
|
235
|
+ // this.weigh_form.clothes_weight = sign.clothes_weight;
|
|
236
|
+ // // 透前
|
|
237
|
+ // this.weigh_form.weigh_before = sign.weigh_before;
|
|
238
|
+ // this.weigh_form.dehydrated_weight = sign.dehydrated_weight;
|
|
239
|
+ // this.weigh_form.dehydrated_percent = sign.dehydrated_percent;
|
|
240
|
+ // this.weigh_form.weight_before = sign.weight_before;
|
|
241
|
+ // this.weigh_form.temperature_before = sign.temperature_before;
|
|
242
|
+ // this.weigh_form.pulse_rate_before = sign.pulse_rate_before; // P 脉率
|
|
243
|
+ // this.weigh_form.respiratory_rate_before = sign.respiratory_rate_before; // R 呼吸频率
|
|
244
|
+ // this.weigh_form.DBP_before = sign.DBP_before; // 舒张压
|
|
245
|
+ // this.weigh_form.SBP_before = sign.SBP_before // 收缩压
|
|
246
|
+ // // 透后
|
|
247
|
+ // this.weigh_form.weigh_after = sign.weigh_after;
|
|
248
|
+ // this.weigh_form.weight_reduce_after = sign.weight_reduce_after;
|
|
249
|
+ // this.weigh_form.weight_after = sign.weight_after
|
|
250
|
+ // this.weigh_form.temperature_after = sign.temperature_after;
|
|
251
|
+ // this.weigh_form.pulse_rate_after = sign.pulse_rate_after; // P 脉率
|
|
252
|
+ // this.weigh_form.respiratory_rate_after = sign.respiratory_rate_after; // R 呼吸频率
|
|
253
|
+ // this.weigh_form.DBP_after = sign.DBP_after; // 舒张压
|
|
254
|
+ // this.weigh_form.SBP_after = sign.SBP_after; // 收缩压
|
|
255
|
+ // this.weigh_form.id=sign.id;
|
|
256
|
+ // }
|
|
257
|
+ // }
|
|
258
|
+ // });
|
|
259
|
+ // },
|
|
260
|
+ changeSearch() {
|
|
261
|
+ this.queryParams.need_schedule_type = 0
|
|
262
|
+ this.fetchSignPatients()
|
|
263
|
+ },
|
|
264
|
+ handleCurrentChange(row, old) {
|
|
265
|
+ this.disa = true
|
|
266
|
+ this.show = false
|
|
267
|
+ this.weigh_form.choose = true
|
|
268
|
+ this.weigh_form.name = row.name
|
|
269
|
+ this.weigh_form.dialysis_no = row.dialysis_no
|
|
270
|
+ this.weigh_form.patient_id = row.id
|
|
271
|
+ this.querySignParams.patient_id = row.id
|
|
272
|
+ this.dialysis_stege = row.dialysis_order.stage
|
|
273
|
+ this.getDialysisInforInfomation(row.id)
|
|
274
|
+ this.getDialysisAfterInfomation(row.id)
|
|
275
|
+
|
|
276
|
+ // this.getsignweigh(row.id)
|
|
277
|
+ },
|
|
278
|
+ // submitSign() {
|
|
279
|
+ // SignWeigh(this.querySignParams, this.weigh_form).then(response => {
|
|
280
|
+ // if (response.data.state === 1) {
|
|
281
|
+ // this.$message({
|
|
282
|
+ // type: 'success',
|
|
283
|
+ // message: '成功!'
|
|
284
|
+ // })
|
|
285
|
+
|
|
286
|
+ // var tlen = this.patients.length
|
|
287
|
+ // for (let index = 0; index < tlen; index++) {
|
|
288
|
+ // if (this.patients[index].id === this.querySignParams.patient_id) {
|
|
289
|
+ // var signin = this.patients[index].signin
|
|
290
|
+ // this.patients[index].signin = response.data.data.sign
|
|
291
|
+
|
|
292
|
+ // if (this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)) {
|
|
293
|
+ // var sl = this.schedules.length
|
|
294
|
+ // for (let j = 0; j < sl; j++) {
|
|
295
|
+ // if (this.schedules[j].type === this.patients[index].schedule.schedule_type) {
|
|
296
|
+ // if (this.weigh_form.id <= 0) {
|
|
297
|
+ // this.schedules[j].sign++
|
|
298
|
+ // }
|
|
299
|
+ // if (signin.weigh_before_time === 0 && response.data.data.sign.weigh_before_time > 0) {
|
|
300
|
+ // this.schedules[j].before++
|
|
301
|
+ // }
|
|
302
|
+
|
|
303
|
+ // if (signin.weigh_time === 0 && response.data.data.sign.weigh_time > 0) {
|
|
304
|
+ // this.schedules[j].after++
|
|
305
|
+ // }
|
|
306
|
+ // }
|
|
307
|
+ // }
|
|
308
|
+ // }
|
|
309
|
+ // break
|
|
310
|
+ // }
|
|
311
|
+ // }
|
|
312
|
+ // this.weigh_form.id = response.data.data.sign.id
|
|
313
|
+ // } else {
|
|
314
|
+ // this.$message.error(response.data.msg)
|
|
315
|
+ // return false
|
|
316
|
+ // }
|
|
317
|
+ // })
|
|
318
|
+ // },
|
|
319
|
+
|
|
320
|
+ getDialysisInforInfomation(id) {
|
|
321
|
+ getDialysisInforInfomation(id).then(response => {
|
|
322
|
+ if (response.data.data.patientlist != null) {
|
|
323
|
+ var patientlist = response.data.data.patientlist
|
|
324
|
+ this.weigh_list.dry_weight = patientlist.dry_weight
|
|
325
|
+ console.log('干体重:' + this.weigh_list.dry_weight)
|
|
326
|
+ if (this.weigh_list.dry_weight == 0) {
|
|
327
|
+ this.weigh_list.dry_weight = ''
|
|
328
|
+ }
|
|
329
|
+ this.weigh_list.weight_before = patientlist.weight_before
|
|
330
|
+ if (this.weigh_list.weight_before == 0) {
|
|
331
|
+ this.weigh_list.weight_before = ''
|
|
332
|
+ }
|
|
333
|
+ this.weigh_list.temperature = patientlist.temperature
|
|
334
|
+ if (this.weigh_list.temperature == 0) {
|
|
335
|
+ this.weigh_list.temperature = ''
|
|
336
|
+ }
|
|
337
|
+ this.weigh_list.pulse_frequency = patientlist.pulse_frequency
|
|
338
|
+ if (this.weigh_list.pulse_frequency == 0) {
|
|
339
|
+ this.weigh_list.pulse_frequency = ''
|
|
340
|
+ }
|
|
341
|
+ this.weigh_list.breathing_rate = patientlist.breathing_rate
|
|
342
|
+ if (this.weigh_list.breathing_rate == 0) {
|
|
343
|
+ this.weigh_list.breathing_rate = ''
|
|
344
|
+ }
|
|
345
|
+ this.weigh_list.systolic_blood_pressure = patientlist.systolic_blood_pressure
|
|
346
|
+ if (this.weigh_list.systolic_blood_pressure == 0) {
|
|
347
|
+ this.weigh_list.systolic_blood_pressure = ''
|
|
348
|
+ }
|
|
349
|
+ this.weigh_list.diastolic_blood_pressure = patientlist.diastolic_blood_pressure
|
|
350
|
+ if (this.weigh_list.diastolic_blood_pressure == 0) {
|
|
351
|
+ this.weigh_list.diastolic_blood_pressure = ''
|
|
352
|
+ }
|
|
353
|
+ }
|
|
354
|
+ })
|
|
355
|
+ },
|
|
356
|
+
|
|
357
|
+ getDialysisAfterInfomation(id) {
|
|
358
|
+ getDialysisAfterInfomation(id).then(response => {
|
|
359
|
+ if (response.data.data.patientinfor != null) {
|
|
360
|
+ var patientinfor = response.data.data.patientinfor
|
|
361
|
+ console.log(patientinfor)
|
|
362
|
+ this.weigh_infor.dry_weight = patientinfor.dry_weight
|
|
363
|
+ if (this.weigh_infor.dry_weight == 0) {
|
|
364
|
+ this.weigh_infor.dry_weight = ''
|
|
365
|
+ }
|
|
366
|
+
|
|
367
|
+ this.weigh_infor.weight_after = patientinfor.weight_after
|
|
368
|
+ if (this.weigh_infor.weight_after == 0) {
|
|
369
|
+ this.weigh_infor.weight_after = ''
|
|
370
|
+ }
|
|
371
|
+
|
|
372
|
+ this.weigh_infor.temperature = patientinfor.temperature
|
|
373
|
+ if (this.weigh_infor.temperature == 0) {
|
|
374
|
+ this.weigh_infor.temperature = ''
|
|
375
|
+ }
|
|
376
|
+ this.weigh_infor.pulse_frequency = patientinfor.pulse_frequency
|
|
377
|
+ if (this.weigh_infor.pulse_frequency == 0) {
|
|
378
|
+ this.weigh_infor.pulse_frequency = ''
|
|
379
|
+ }
|
|
380
|
+ this.weigh_infor.breathing_rate = patientinfor.breathing_rate
|
|
381
|
+ if (this.weigh_infor.breathing_rate == 0) {
|
|
382
|
+ this.weigh_infor.breathing_rate = ''
|
|
383
|
+ }
|
|
384
|
+ this.weigh_infor.systolic_blood_pressure = patientinfor.systolic_blood_pressure
|
|
385
|
+ if (this.weigh_infor.systolic_blood_pressure == 0) {
|
|
386
|
+ this.weigh_infor.systolic_blood_pressure = ''
|
|
387
|
+ }
|
|
388
|
+
|
|
389
|
+ this.weigh_infor.diastolic_blood_pressure = patientinfor.diastolic_blood_pressure
|
|
390
|
+ if (this.weigh_infor.diastolic_blood_pressure == 0) {
|
|
391
|
+ this.weigh_infor.diastolic_blood_pressure = ''
|
|
392
|
+ }
|
|
393
|
+ }
|
|
394
|
+ })
|
|
395
|
+ },
|
|
396
|
+ change() {
|
|
397
|
+ this.show = true
|
|
398
|
+ this.disa = false
|
|
399
|
+ },
|
|
400
|
+ savedata() {
|
|
401
|
+ var params = new Object()
|
|
402
|
+ params.patient_id = this.weigh_form.patient_id
|
|
403
|
+ params.dry_weight = this.weigh_list.dry_weight
|
|
404
|
+ params.weight_before = this.weigh_list.weight_before
|
|
405
|
+ params.temperature = this.weigh_list.temperature
|
|
406
|
+ params.pulse_frequency = this.weigh_list.pulse_frequency
|
|
407
|
+ params.breathing_rate = this.weigh_list.breathing_rate
|
|
408
|
+ params.systolic_blood_pressure = this.weigh_list.systolic_blood_pressure
|
|
409
|
+ params.diastolic_blood_pressure = this.weigh_list.diastolic_blood_pressure
|
|
410
|
+ createdata(params).then(response => {
|
|
411
|
+ if (response.data.state === 1) {
|
|
412
|
+ this.$message({
|
|
413
|
+ type: 'success',
|
|
414
|
+ message: '成功!'
|
|
415
|
+ })
|
|
416
|
+ }
|
|
417
|
+ })
|
|
418
|
+ },
|
|
419
|
+ hide() {
|
|
420
|
+ this.show = false
|
|
421
|
+ },
|
|
422
|
+ updatedata() {
|
|
423
|
+ var params = new Object()
|
|
424
|
+ params.patient_id = this.weigh_form.patient_id
|
|
425
|
+ params.dry_weight = this.weigh_infor.dry_weight
|
|
426
|
+ params.weight_after = this.weigh_infor.weight_after
|
|
427
|
+ params.temperature = this.weigh_infor.temperature
|
|
428
|
+ params.pulse_frequency = this.weigh_infor.pulse_frequency
|
|
429
|
+ params.breathing_rate = this.weigh_infor.breathing_rate
|
|
430
|
+ params.systolic_blood_pressure = this.weigh_infor.systolic_blood_pressure
|
|
431
|
+ params.diastolic_blood_pressure = this.weigh_infor.diastolic_blood_pressure
|
|
432
|
+ editdata(params).then(response => {
|
|
433
|
+ if (response.data.state === 1) {
|
|
434
|
+ this.$message({
|
|
435
|
+ type: 'success',
|
|
436
|
+ message: '成功!'
|
|
437
|
+ })
|
|
438
|
+ }
|
|
439
|
+ })
|
|
440
|
+ console.log('hahahahah')
|
|
441
|
+ console.log(params)
|
|
442
|
+ },
|
|
443
|
+ sighdata() {
|
|
444
|
+ // 透前数据
|
|
445
|
+ var params = new Object()
|
|
446
|
+ var data_time = this.querySignParams.date_time
|
|
447
|
+ params.date_time = data_time
|
|
448
|
+ params.patient_id = this.weigh_form.patient_id
|
|
449
|
+ params.dry_weight = this.weigh_list.dry_weight
|
|
450
|
+ params.weight_before = this.weigh_list.weight_before
|
|
451
|
+ params.temperature = this.weigh_list.temperature
|
|
452
|
+ params.pulse_frequency = this.weigh_list.pulse_frequency
|
|
453
|
+ params.breathing_rate = this.weigh_list.breathing_rate
|
|
454
|
+ params.systolic_blood_pressure = this.weigh_list.systolic_blood_pressure
|
|
455
|
+ params.diastolic_blood_pressure = this.weigh_list.diastolic_blood_pressure
|
|
456
|
+
|
|
457
|
+ // 透后数据
|
|
458
|
+ params.weight_after = this.weigh_infor.weight_after
|
|
459
|
+ params.temperatureafter = this.weigh_infor.temperature
|
|
460
|
+ params.pulse_frequencyafter = this.weigh_infor.pulse_frequency
|
|
461
|
+ params.breathing_rateafter = this.weigh_infor.breathing_rate
|
|
462
|
+ params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
|
|
463
|
+ params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
|
|
464
|
+ console.log('params是什么?', params)
|
|
465
|
+ sighdata(params).then(response => {
|
|
466
|
+ var signs = response.data.data.signs
|
|
467
|
+ // this.patients[this.table_current_index].signin.id = 1
|
|
468
|
+ if (response.data.state === 1) {
|
|
469
|
+ this.$message({
|
|
470
|
+ type: 'success',
|
|
471
|
+ message: '成功!'
|
|
472
|
+ })
|
|
473
|
+ var tlen = this.patients.length
|
|
474
|
+
|
|
475
|
+ for (let index = 0; index < tlen; index++) {
|
|
476
|
+ if (this.patients[index].id == params.patient_id) {
|
|
477
|
+ var signin = this.patients[index].signin
|
|
478
|
+ this.patients[index].signin = response.data.data.signs
|
|
479
|
+
|
|
480
|
+ if (this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)) {
|
|
481
|
+ var sl = this.schedules.length
|
|
482
|
+ for (let j = 0; j < sl; j++) {
|
|
483
|
+ if (this.schedules[j].type == this.patients[index].schedule.schedule_type) {
|
|
484
|
+ if ((signin.weigh_before_time == 0 && response.data.data.signs.weigh_before_time > 0) || (signin.weigh_time === 0 && response.data.data.signs.weigh_time > 0)) {
|
|
485
|
+ this.schedules[j].sign++
|
|
486
|
+ }
|
|
487
|
+ if (signin.weigh_before_time === 0 && response.data.data.signs.weigh_before_time > 0) {
|
|
488
|
+ this.schedules[j].before++
|
|
489
|
+ }
|
|
490
|
+ if (signin.weigh_time == 0 && response.data.data.signs.weigh_time > 0) {
|
|
491
|
+ this.schedules[j].after++
|
|
492
|
+ }
|
|
493
|
+ }
|
|
494
|
+ }
|
|
495
|
+ }
|
|
496
|
+ break
|
|
497
|
+ }
|
|
498
|
+ }
|
|
499
|
+ this.weigh_form.id = response.data.data.signs.id
|
|
500
|
+ } else {
|
|
501
|
+ this.$message.error(response.data.msg)
|
|
502
|
+ return false
|
|
503
|
+ }
|
|
504
|
+ })
|
|
505
|
+ }
|
|
506
|
+ },
|
|
507
|
+ watch: {
|
|
508
|
+ 'weigh_form.weigh_before': function() {
|
|
509
|
+ this.weigh_form.weight_before = this.weigh_form.weigh_before - this.weigh_form.clothes_weight
|
|
510
|
+ this.weigh_form.dehydrated_weight = this.weigh_form.weigh_before - this.weigh_form.dry_weight - this.weigh_form.clothes_weight
|
|
511
|
+ this.weigh_form.weight_before += ''
|
|
512
|
+ this.weigh_form.dehydrated_weight += ''
|
|
513
|
+
|
|
514
|
+ if (this.dialysis_stege === 2) {
|
|
515
|
+ this.weigh_form.weight_reduce_after = this.weigh_form.weigh_before - this.weigh_form.weigh_after
|
|
516
|
+ this.weigh_form.weight_reduce_after += ''
|
|
517
|
+ }
|
|
518
|
+ },
|
|
519
|
+ 'weigh_form.weigh_after': function() {
|
|
520
|
+ if (this.dialysis_stege === 2) {
|
|
521
|
+ this.weigh_form.weight_reduce_after = this.weigh_form.weigh_before - this.weigh_form.weigh_after
|
|
522
|
+ this.weigh_form.weight_reduce_after += ''
|
|
523
|
+
|
|
524
|
+ this.weigh_form.weight_after = this.weigh_form.weigh_after - this.weigh_form.clothes_weight
|
|
525
|
+ this.weigh_form.weight_after += ''
|
|
526
|
+ }
|
|
527
|
+ },
|
|
528
|
+ 'weigh_form.clothes_weight': function() {
|
|
529
|
+ this.weigh_form.weight_before = this.weigh_form.weigh_before - this.weigh_form.clothes_weight
|
|
530
|
+ this.weigh_form.dehydrated_weight = this.weigh_form.weigh_before - this.weigh_form.dry_weight - this.weigh_form.clothes_weight
|
|
531
|
+ this.weigh_form.weight_before += ''
|
|
532
|
+ this.weigh_form.dehydrated_weight += ''
|
|
533
|
+
|
|
534
|
+ if (this.dialysis_stege === 2) {
|
|
535
|
+ this.weigh_form.weight_after = this.weigh_form.weigh_after - this.weigh_form.clothes_weight
|
|
536
|
+ this.weigh_form.weight_after += ''
|
|
537
|
+ }
|
|
538
|
+ },
|
|
539
|
+ 'weigh_form.dry_weight': function() {
|
|
540
|
+ this.weigh_form.dehydrated_weight = this.weigh_form.weigh_before - this.weigh_form.dry_weight - this.weigh_form.clothes_weight
|
|
541
|
+
|
|
542
|
+ this.weigh_form.dehydrated_weight += ''
|
|
543
|
+ },
|
|
544
|
+ 'weigh_form.dehydrated_weight': function() {
|
|
545
|
+ if (this.weigh_form.dry_weight === 0) {
|
|
546
|
+ this.weigh_form.dehydrated_percent = ''
|
|
547
|
+ } else {
|
|
548
|
+ var dehydrated_percent = ((this.weigh_form.dehydrated_weight / this.weigh_form.dry_weight) * 100).toFixed(2)
|
|
549
|
+ if (isNaN(dehydrated_percent)) {
|
|
550
|
+ this.weigh_form.dehydrated_percent = ''
|
|
551
|
+ } else {
|
|
552
|
+ this.weigh_form.dehydrated_percent = dehydrated_percent + '%'
|
|
553
|
+ }
|
|
554
|
+ }
|
|
555
|
+ }
|
|
556
|
+
|
|
557
|
+ },
|
|
558
|
+ created() {
|
|
559
|
+ this.queryParams.schedule_type = -1
|
|
560
|
+ this.queryParams.need_schedule_type = 1
|
|
561
|
+ this.fetchSignPatients()
|
|
562
|
+ }
|
|
563
|
+}
|
|
564
|
+</script>
|
|
565
|
+
|
|
566
|
+<style rel="stylesheet/css" lang="scss" scoped>
|
|
567
|
+.information {
|
|
568
|
+ border: 1px #EBEEF5 solid;
|
|
569
|
+ padding: 30px 20px 30px 20px;
|
|
570
|
+
|
|
571
|
+ .border {
|
|
572
|
+ border-bottom: 1px #dcdfe6 solid;
|
|
573
|
+ margin: 0px 0 20px 0;
|
|
574
|
+ }
|
|
575
|
+}
|
|
576
|
+.title {
|
|
577
|
+ background:#409eff;
|
|
578
|
+ height: 44px;
|
|
579
|
+ line-height: 44px;
|
|
580
|
+ padding: 0 0 0 10px;
|
|
581
|
+ color: #fff;
|
|
582
|
+ margin: 0 0 10px 0;
|
|
583
|
+ // border-radius: 4px 4px 0 0;
|
|
584
|
+}
|
|
585
|
+
|
|
586
|
+.edit_separater {
|
|
587
|
+ border-top: 1px solid rgb(233, 233, 233);
|
|
588
|
+ margin-top: 15px;
|
|
589
|
+ margin-bottom: 15px;
|
|
590
|
+}
|
|
591
|
+
|
|
592
|
+</style>
|
|
593
|
+
|
|
594
|
+<style>
|
|
595
|
+.sign-and-weigh-box .sign-and-weigh-box-patients .cell{
|
|
596
|
+ font-size: 14px;
|
|
597
|
+}
|
|
598
|
+
|
|
599
|
+.sign-and-weigh-box .sign-and-weigh-box-patients .current-row>td{
|
|
600
|
+ background: #6fb5fa;
|
|
601
|
+}
|
|
602
|
+
|
|
603
|
+ .button{
|
|
604
|
+ float: right;
|
|
605
|
+ margin-bottom:0px;
|
|
606
|
+ }
|
|
607
|
+
|
|
608
|
+ .inforTitle{
|
|
609
|
+ line-height: 40px;
|
|
610
|
+ height: 50px;
|
|
611
|
+ }
|
|
612
|
+
|
|
613
|
+ .el-table th .cell, .el-table td .cell{
|
|
614
|
+ padding: 0!important;
|
|
615
|
+ }
|
|
616
|
+</style>
|