浏览代码

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

zhengchengwu 6 年前
父节点
当前提交
94653f1356
共有 6 个文件被更改,包括 1822 次插入1383 次删除
  1. 180 170
      src/api/patient.js
  2. 56 20
      src/api/signandweigh.js
  3. 3 1
      src/main.js
  4. 445 382
      src/xt_pages/sign/index.vue
  5. 446 373
      src/xt_pages/user/components/PatientDetail.vue
  6. 692 437
      src/xt_pages/user/patients.vue

+ 180 - 170
src/api/patient.js 查看文件

@@ -1,236 +1,246 @@
1 1
 import request from '@/utils/request'
2 2
 
3
-export function fetchList(params){
4
-    return request({
5
-        url:'/api/patients',
6
-        method:'get',
7
-        params:params
8
-    })
3
+export function fetchList(params) {
4
+  return request({
5
+    url: '/api/patients',
6
+    method: 'get',
7
+    params: params
8
+  })
9 9
 }
10 10
 
11
-export function fetchAllList(){
12
-    return request({
13
-        url:'/api/patients/all',
14
-        method:'get',
15
-    })
11
+export function fetchAllList() {
12
+  return request({
13
+    url: '/api/patients/all',
14
+    method: 'get'
15
+  })
16 16
 }
17
-export function GetPatientTotal(){
18
-    return request({
19
-        url:'/api/patients/total',
20
-        method:'get',
21
-    })
17
+export function GetPatientTotal() {
18
+  return request({
19
+    url: '/api/patients/total',
20
+    method: 'get'
21
+  })
22 22
 }
23 23
 
24 24
 export function generateDialysisNo() {
25
-    return request({
26
-        url:'/api/patients/generatedialysisno',
27
-        method:'get'
28
-    })
25
+  return request({
26
+    url: '/api/patients/generatedialysisno',
27
+    method: 'get'
28
+  })
29 29
 }
30 30
 
31 31
 export function createPatient(patient) {
32
-    return request({
33
-        url:'/api/patients/create',
34
-        method:'post',
35
-        data:patient,
36
-    })
37
-}
38
-export function editPatient(id,patient) {
39
-    return request({
40
-        url:'/api/patients/edit?id='+id,
41
-        method:'put',
42
-        data:patient,
43
-    })
32
+  return request({
33
+    url: '/api/patients/create',
34
+    method: 'post',
35
+    data: patient
36
+  })
37
+}
38
+export function editPatient(id, patient) {
39
+  return request({
40
+    url: '/api/patients/edit?id=' + id,
41
+    method: 'put',
42
+    data: patient
43
+  })
44 44
 }
45 45
 export function fetchPatient(id) {
46
-    return request({
47
-        url:'/api/patients/get?id='+id,
48
-        method:'get',
49
-    })
46
+  return request({
47
+    url: '/api/patients/get?id=' + id,
48
+    method: 'get'
49
+  })
50 50
 }
51 51
 
52
-
53
-export function fetchPatientDialysisSolutions(params){
54
-    return request({
55
-        url:'/api/patients/dialysissolutions',
56
-        method:'Get',
57
-        params:params,
58
-    })
52
+export function fetchPatientDialysisSolutions(params) {
53
+  return request({
54
+    url: '/api/patients/dialysissolutions',
55
+    method: 'Get',
56
+    params: params
57
+  })
59 58
 }
60 59
 
61
-export function createPatientDialysisSolution(id,solution){
62
-    return request({
63
-        url:'/api/patients/dialysissolution/create?patient='+id,
64
-        method:'post',
65
-        data:solution,
66
-    })
60
+export function createPatientDialysisSolution(id, solution) {
61
+  return request({
62
+    url: '/api/patients/dialysissolution/create?patient=' + id,
63
+    method: 'post',
64
+    data: solution
65
+  })
67 66
 }
68 67
 
69
-export function editPatientDialysisSolution(patient, id,solution){
70
-    return request({
71
-        url:'/api/patients/dialysissolution/edit?patient='+patient + '&id='+id,
72
-        method:'put',
73
-        data:solution,
74
-    })
68
+export function editPatientDialysisSolution(patient, id, solution) {
69
+  return request({
70
+    url: '/api/patients/dialysissolution/edit?patient=' + patient + '&id=' + id,
71
+    method: 'put',
72
+    data: solution
73
+  })
75 74
 }
76 75
 
77
-export function createChildPatientDialysisSolution(id,solution){
78
-    return request({
79
-        url:'/api/patients/dialysissolution/child/create?patient='+id,
80
-        method:'post',
81
-        data:solution,
82
-    })
76
+export function createChildPatientDialysisSolution(id, solution) {
77
+  return request({
78
+    url: '/api/patients/dialysissolution/child/create?patient=' + id,
79
+    method: 'post',
80
+    data: solution
81
+  })
83 82
 }
84 83
 
85
-
86
-export function editChildPatientDialysisSolution(patient, id, solution){
87
-    return request({
88
-        url:'/api/patients/dialysissolution/child/edit?patient='+patient + '&id='+id,
89
-        method:'put',
90
-        data:solution,
91
-    })
84
+export function editChildPatientDialysisSolution(patient, id, solution) {
85
+  return request({
86
+    url: '/api/patients/dialysissolution/child/edit?patient=' + patient + '&id=' + id,
87
+    method: 'put',
88
+    data: solution
89
+  })
92 90
 }
93 91
 
94
-export function editDialysisSolutionDetail(patient, id, solution){
95
-    return request({
96
-        url:'/api/patients/dialysissolution/detail/edit?patient='+patient + '&id='+id,
97
-        method:'put',
98
-        data:solution,
99
-    })
92
+export function editDialysisSolutionDetail(patient, id, solution) {
93
+  return request({
94
+    url: '/api/patients/dialysissolution/detail/edit?patient=' + patient + '&id=' + id,
95
+    method: 'put',
96
+    data: solution
97
+  })
100 98
 }
101 99
 
102
-
103
-export function deleteDialysisSolution(id){
104
-    return request({
105
-        url:'/api/patients/dialysissolution/delete?id='+id,
106
-        method:'delete',
107
-    })
100
+export function deleteDialysisSolution(id) {
101
+  return request({
102
+    url: '/api/patients/dialysissolution/delete?id=' + id,
103
+    method: 'delete'
104
+  })
108 105
 }
109 106
 
110
-export function createDryWeight(patient, weight){
111
-    return request({
112
-        url:'/api/patients/dryweight/create?id='+patient,
113
-        method:'post',
114
-        data:weight,
115
-    })
107
+export function createDryWeight(patient, weight) {
108
+  return request({
109
+    url: '/api/patients/dryweight/create?id=' + patient,
110
+    method: 'post',
111
+    data: weight
112
+  })
116 113
 }
117 114
 
118
-export function getDryWeights(params){
119
-    return request({
120
-        url:'/api/patients/dryweight/get',
121
-        method:'get',
122
-        params:params
123
-    })
115
+export function getDryWeights(params) {
116
+  return request({
117
+    url: '/api/patients/dryweight/get',
118
+    method: 'get',
119
+    params: params
120
+  })
124 121
 }
125 122
 
126 123
 export function getPatientDialysisRecords(params) {
127
-    return request({
128
-        url:'/api/patients/dialysisrecords',
129
-        method:'get',
130
-        params:params
131
-    })
124
+  return request({
125
+    url: '/api/patients/dialysisrecords',
126
+    method: 'get',
127
+    params: params
128
+  })
132 129
 }
133 130
 export function getPatientProEducation(params) {
134
-    return request({
135
-        url:'/api/patients/proeducation',
136
-        method:'get',
137
-        params:params
138
-    })
131
+  return request({
132
+    url: '/api/patients/proeducation',
133
+    method: 'get',
134
+    params: params
135
+  })
139 136
 }
140 137
 
141 138
 export function getCourseOfDiseaseRecords(patient_id, start_time_ymd, end_time_ymd) {
142
-    var params = {
143
-        patient_id: patient_id,
144
-        start_time: start_time_ymd,
145
-        end_time: end_time_ymd,
146
-    }
147
-    return request({
148
-        url: '/api/patient/courses',
149
-        method: 'get',
150
-        params: params,
151
-    })
139
+  var params = {
140
+    patient_id: patient_id,
141
+    start_time: start_time_ymd,
142
+    end_time: end_time_ymd
143
+  }
144
+  return request({
145
+    url: '/api/patient/courses',
146
+    method: 'get',
147
+    params: params
148
+  })
152 149
 }
153 150
 
154 151
 export function createCourseOfDiseaseRecord(patient_id, content) {
155
-    var params = {
156
-        patient_id: patient_id,
157
-        content: content,
158
-    }
159
-    return request({
160
-        url: '/api/patient/course/create',
161
-        method: 'post',
162
-        params: params,
163
-    })
152
+  var params = {
153
+    patient_id: patient_id,
154
+    content: content
155
+  }
156
+  return request({
157
+    url: '/api/patient/course/create',
158
+    method: 'post',
159
+    params: params
160
+  })
164 161
 }
165 162
 
166 163
 export function getRescueRecords(patient_id, start_time_ymd, end_time_ymd) {
167
-    var params = {
168
-        patient_id: patient_id,
169
-        start_time: start_time_ymd,
170
-        end_time: end_time_ymd,
171
-    }
172
-    return request({
173
-        url: '/api/patient/rescues',
174
-        method: 'get',
175
-        params: params,
176
-    })
164
+  var params = {
165
+    patient_id: patient_id,
166
+    start_time: start_time_ymd,
167
+    end_time: end_time_ymd
168
+  }
169
+  return request({
170
+    url: '/api/patient/rescues',
171
+    method: 'get',
172
+    params: params
173
+  })
177 174
 }
178 175
 
179 176
 export function createRescueRecord(patient_id, content) {
180
-    var params = {
181
-        patient_id: patient_id,
182
-        content: content,
183
-    }
184
-    return request({
185
-        url: '/api/patient/rescue/create',
186
-        method: 'post',
187
-        params: params,
188
-    })
177
+  var params = {
178
+    patient_id: patient_id,
179
+    content: content
180
+  }
181
+  return request({
182
+    url: '/api/patient/rescue/create',
183
+    method: 'post',
184
+    params: params
185
+  })
189 186
 }
190 187
 
191 188
 export function deleteCourseOfDiseaseRecords(patient_id, ids_str) {
192
-    var params = {
193
-        patient_id: patient_id,
194
-        ids: ids_str,
195
-    }
196
-    return request({
197
-        url: '/api/patient/course/delete',
198
-        method: 'post',
199
-        params: params,
200
-    })
189
+  var params = {
190
+    patient_id: patient_id,
191
+    ids: ids_str
192
+  }
193
+  return request({
194
+    url: '/api/patient/course/delete',
195
+    method: 'post',
196
+    params: params
197
+  })
201 198
 }
202 199
 
203 200
 export function deleteRescueRecords(patient_id, ids_str) {
204
-    var params = {
205
-        patient_id: patient_id,
206
-        ids: ids_str,
207
-    }
208
-    return request({
209
-        url: '/api/patient/rescue/delete',
210
-        method: 'post',
211
-        params: params,
212
-    })
201
+  var params = {
202
+    patient_id: patient_id,
203
+    ids: ids_str
204
+  }
205
+  return request({
206
+    url: '/api/patient/rescue/delete',
207
+    method: 'post',
208
+    params: params
209
+  })
213 210
 }
214 211
 
215 212
 export function EditLapseto(patient_id, data) {
216
-    return request({
217
-        url: '/api/patients/lapseto/edit?id='+patient_id,
218
-        method: 'post',
219
-        data: data,
220
-    })
221
-    
213
+  return request({
214
+    url: '/api/patients/lapseto/edit?id=' + patient_id,
215
+    method: 'post',
216
+    data: data
217
+  })
222 218
 }
223 219
 
224
-
225
-
226
-
227
-
228 220
 export function PostSearch(keyword) {
229 221
   return request({
230
-    url: '/api/patients/search?keyword='+keyword,
231
-    method: 'post',
222
+    url: '/api/patients/search?keyword=' + keyword,
223
+    method: 'post'
232 224
 
233 225
   })
226
+}
234 227
 
228
+export function OpenView(id) {
229
+  return request({
230
+    url: '/api/patients/querypatientbyId',
231
+    method: 'Get',
232
+    params: {
233
+      id: id
234
+    }
235
+  })
235 236
 }
236 237
 
238
+export function code(id) {
239
+  return request({
240
+    url: '/api/patients/codebyId',
241
+    method: 'Get',
242
+    params: {
243
+      id: id
244
+    }
245
+  })
246
+}

+ 56 - 20
src/api/signandweigh.js 查看文件

@@ -1,26 +1,62 @@
1
-import request from '@/utils/request';
1
+import request from '@/utils/request'
2 2
 
3
-export function fetchSignPatients(params){
4
-    return request({
5
-        url:'/api/sign/patients',
6
-        method:'get',
7
-        params:params,
8
-    })
3
+export function fetchSignPatients(params) {
4
+  return request({
5
+    url: '/api/sign/patients',
6
+    method: 'get',
7
+    params: params
8
+  })
9 9
 }
10 10
 
11
-export function getPatientSign(params){
12
-    return request({
13
-        url:'/api/sign/patientsign',
14
-        method:'get',
15
-        params:params,
16
-    })
11
+export function getPatientSign(params) {
12
+  return request({
13
+    url: '/api/sign/patientsign',
14
+    method: 'get',
15
+    params: params
16
+  })
17 17
 }
18 18
 
19 19
 export function SignWeigh(params, data) {
20
-    return request({
21
-        url:'/api/signweign',
22
-        params: params,
23
-        data: data,
24
-        method:"Post",
25
-    })
26
-}
20
+  return request({
21
+    url: '/api/signweign',
22
+    params: params,
23
+    data: data,
24
+    method: 'Post'
25
+  })
26
+}
27
+
28
+export function getDialysisInforInfomation(id) {
29
+  return request({
30
+    url: '/api/sign/getDialysisInforInfomation',
31
+    method: 'Get',
32
+    params: {
33
+      patient_id: id
34
+    }
35
+  })
36
+}
37
+
38
+export function getDialysisAfterInfomation(id) {
39
+  return request({
40
+    url: '/api/sign/getDialysisAfterInfomation',
41
+    method: 'Get',
42
+    params: {
43
+      patient_id: id
44
+    }
45
+  })
46
+}
47
+
48
+export function createdata(params) {
49
+  return request({
50
+    url: '/api/sign/savaData',
51
+    method: 'Post',
52
+    params: params
53
+  })
54
+}
55
+
56
+export function editdata(params) {
57
+  return request({
58
+    url: '/api/sign/editdata',
59
+    method: 'Post',
60
+    params: params
61
+  })
62
+}

+ 3 - 1
src/main.js 查看文件

@@ -13,7 +13,7 @@ import '@/assets/icon/iconfont.css'
13 13
 import App from './App'
14 14
 import router from './router'
15 15
 import store from './store'
16
-
16
+import { Base64 } from 'js-base64'
17 17
 import i18n from './lang' // Internationalization
18 18
 import './icons' // icon
19 19
 import './errorLog'// error log
@@ -42,3 +42,5 @@ new Vue({
42 42
   i18n,
43 43
   render: h => h(App)
44 44
 })
45
+
46
+Vue.prototype.Base64 = require('js-base64').Base64

+ 445 - 382
src/xt_pages/sign/index.vue 查看文件

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

文件差异内容过多而无法显示
+ 446 - 373
src/xt_pages/user/components/PatientDetail.vue


文件差异内容过多而无法显示
+ 692 - 437
src/xt_pages/user/patients.vue